• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TP Command

Ward_214

Pro PvP
Joined
Dec 11, 2008
Messages
297
Reaction score
0
I need this script to be buyable by an NPC. Can anyone help me out?

The script should be like this

Code:
 local places = {
   ["temple"] = {position = {x=95, y=117, z=7}, level = 7},
   ["depot"] = {position = {x=96, y=118, z=7}, level = 8},
   ["hutning"] = {position = {x=90, y=119, z=7}, level = 10}
}
local vip = 95883   ---- the vip storage u using shawak's vip system then it will be liek that
local nameoftpitem = "tp command rune"    --- name of the items player will by from shop
function onSay(cid, words, param)
    local tp = places[param]
    if (param == "") then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Write a position you want to be teleported to.")
    return TRUE
    end
 
  if getPlayerStorageValue(cid, vip) < 1 then
     doPlayerSendCancel(cid, "You must be a vip player to use this command.")
   return TRUE
 end
 if getPlayerStorageValue(cid, 1156) ~= 1 and getPlayerStorageValue(cid, 95883) then
    doPlayerSendCancel(cid, "You must buy the "..nameoftpitem.." from shop to use this command.")
   return TRUE
 end
 if getPlayerLevel(cid) < tp.level then
    doPlayerSendCancel(cid, "Sorry,only players level " ..tp.level.. " can use this command.")
   return TRUE
 end
 if (hasCondition(cid, CONDITION_INFIGHT) == TRUE) then
    doPlayerSendCancel(cid, "Sorry,you have a battle sign")
   return TRUE
 end
 
 if getPlayerStorageValue(cid, 1156) == 1 then
    doTeleportThing(cid, tp.position)
    doSendMagicEffect(getPlayerPosition(cid), 10)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You teleported to ".. param .." !")
   return TRUE
 end
end

Although, I would like it to be buyable by NPC... You will get rep!!! Thank you, thank you, thank you!
 
Back
Top