Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onUse(cid, item, frompos, item2, topos)
- local guildName, pos = getItemAttribute(item.uid, "description"):match("Lugar da guild: (.+)."), getThingPos(item.uid)
- if(item.aid == 0)then -- /\
- pos.x = pos.x + 2
- elseif(item.aid == 1)then -- \/
- pos.x = pos.x -2
- elseif(item.aid == 2)then -- >
- pos.y = pos.y + 2
- elseif(item.aid == 3)then -- <
- pos.y = pos.y - 2
- end
- if(guildName == getPlayerGuildName(cid))then
- doTeleportThing(cid, pos, false) -- esse false e pro pushMove, ou seja, false para nao parecer que ele esta sendo puxado
- doCreatureSay(cid, "Welcome Guildmember!", TALKTYPE_ORANGE_1)
- else
- doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, but you're not in this guild.")
- return false
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement