Olá pessoal estava brincando com os script's aqui e decidi fazer esse tutorial para algum otserv .
Versão : 8.6+
Testado : Não.
P: Oque o script faz?
R: É simples , o player precisará ter 4 sword e serão 4 coal basin ele terá que colocar as 4 swords nas 4 coal basins e apertar a alavanca , ao fazer isso ele ganhará uma pharaoh sword , vamos lá?
function onUse(cid, item, fromPosition, itemEx, toPosition) coalbasin1 = {x=1027, y=1021, z=7, stackpos=STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE} coalbasin2 = {x=1026, y=1022, z=7, stackpos=STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE} coalbasin3 = {x=1027, y=1023, z=7, stackpos=STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE} coalbasin4 = {x=1028, y=1022, z=7, stackpos=STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE} item1 = getThingFromPos(coalbasin1) item2 = getThingFromPos(coalbasin2) item3 = getThingFromPos(coalbasin3) item4 = getThingFromPos(coalbasin4) end if item.actionid == 20020 then if item1.itemid == 2400 and item2.itemid == 2393 and item3.itemid == 7386 and item4.itemid == 7385 then doRemoveItem(item1.uid) doRemoveItem(item2.uid) doRemoveItem(item3.uid) doRemoveItem(item4.uid) setPlayerStorageValue(cid,2479,1) doPlayerAddItem(cid,2446,type) return FALSE end return TRUE end
Esse é o script , agora vamos a tag.
<action actionid="20020" script="pharaohquest.lua"/
Qualquer duvida ou erro poste abaixo .
Abraços,
Felipe