• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Only Promoted Players can use this talkaction ?

WiLDTuRTLE

Member
Joined
Feb 26, 2011
Messages
478
Reaction score
5
So my problem is i want this command to ONLY be used by promoted player, which is Royal Pally, Elite Knight, Master Sorcerer , Elder Druid, so druid, knight, pally and sorc cant use it at all, anyone can help me?

Code:
local to = {
["temple"] = {x=1063, y=607, z=7},
["depot"] = {x=1037, y=586, z=7}, 
["dp"] = {x=1037, y=586, z=7}, 
["teleports"] = {x=1158, y=689, z=7}, 
["jail"] = {x=1150, y=848, z=6}, 
["prek"] = {x=1381, y=593, z=7}, 
["cudz"] = {x=975, y=818, z=7}, 
["xypoz"] = {x=1657, y=1110, z=7}, 
["carlin"] = {x=1203, y=507, z=7}, 
["thais"] = {x=1062, y=581, z=7}, 
["tps"] = {x=1158, y=689, z=7}, 
["ship"] = {x=1006, y=576, z=6}, 
["desert"] = {x=873, y=632, z=6}, 
["trainers"] = {x=1095, y=793, z=8}, 
["train"] = {x=1109, y=441, z=7}, 
["donate"] = {x=987, y=420, z=7}, 
["arena"] = {x=1027, y=505, z=7}, 
["duel"] = {x=1137, y=702, z=7}, 
["island"] = {x=1030, y=798, z=7}, 
["die"] = {x=1650, y=1110, z=8},
["turtle"] = {x=2207, y=1484, z=7},
["yalahar"] = {x=1516, y=1172, z=7},
["edron"] = {x=2106, y=1499, z=8},
["stonehome"] = {x=2222, y=1438, z=7},
["port hope"] = {x=1763, y=1228, z=7},
["cuddle town"] = {x=1440, y=509, z=7},
["joez"] = {x=1639, y=727, z=6},
["udz"] = {x=1893, y=1442, z=7},
["godz"] = {x=1674, y=846, z=7},
["garden"] = {x=1619, y=585, z=7},
["crez"] = {x=1097, y=862, z=6},
["chuz"] = {x=1100, y=917, z=7},
["kelz"] = {x=1674, y=846, z=7},
["monument"] = {x=1095, y=1029, z=7},
["allyz"] = {x=1154, y=809, z=7},
["bar"] = {x=1234, y=725, z=7},
["battle"] = {x=1861, y=1200, z=7},
["lucz"] = {x=1038, y=789, z=7},
["there"] = {x=1162, y=691, z=7},
["hanz"] = {x=2161, y=1024, z=7},
["hell"] = {x=1340, y=1158, z=7},
} 

function onSay(cid, words, param, channel)
        local p = param:lower()
        if getCreatureCondition(cid,CONDITION_INFIGHT) == false then
                if to[p] ~= nil then
                        doTeleportThing(cid,to[p])
                        doSendMagicEffect(to[p],10)
                        doPlayerSendTextMessage(cid,4,"Teleported to "..p..".")
                else
                        doPlayerSendTextMessage(cid,4,"Invalid Location.")
                end
        else
                doPlayerSendTextMessage(cid,4,"Lose PZ.")
        end
        return true
end

thaanks
 
Aright ..

LUA:
local to = {
["temple"] = {x=1063, y=607, z=7},
["depot"] = {x=1037, y=586, z=7}, 
["dp"] = {x=1037, y=586, z=7}, 
["teleports"] = {x=1158, y=689, z=7}, 
["jail"] = {x=1150, y=848, z=6}, 
["prek"] = {x=1381, y=593, z=7}, 
["cudz"] = {x=975, y=818, z=7}, 
["xypoz"] = {x=1657, y=1110, z=7}, 
["carlin"] = {x=1203, y=507, z=7}, 
["thais"] = {x=1062, y=581, z=7}, 
["tps"] = {x=1158, y=689, z=7}, 
["ship"] = {x=1006, y=576, z=6}, 
["desert"] = {x=873, y=632, z=6}, 
["trainers"] = {x=1095, y=793, z=8}, 
["train"] = {x=1109, y=441, z=7}, 
["donate"] = {x=987, y=420, z=7}, 
["arena"] = {x=1027, y=505, z=7}, 
["duel"] = {x=1137, y=702, z=7}, 
["island"] = {x=1030, y=798, z=7}, 
["die"] = {x=1650, y=1110, z=8},
["turtle"] = {x=2207, y=1484, z=7},
["yalahar"] = {x=1516, y=1172, z=7},
["edron"] = {x=2106, y=1499, z=8},
["stonehome"] = {x=2222, y=1438, z=7},
["port hope"] = {x=1763, y=1228, z=7},
["cuddle town"] = {x=1440, y=509, z=7},
["joez"] = {x=1639, y=727, z=6},
["udz"] = {x=1893, y=1442, z=7},
["godz"] = {x=1674, y=846, z=7},
["garden"] = {x=1619, y=585, z=7},
["crez"] = {x=1097, y=862, z=6},
["chuz"] = {x=1100, y=917, z=7},
["kelz"] = {x=1674, y=846, z=7},
["monument"] = {x=1095, y=1029, z=7},
["allyz"] = {x=1154, y=809, z=7},
["bar"] = {x=1234, y=725, z=7},
["battle"] = {x=1861, y=1200, z=7},
["lucz"] = {x=1038, y=789, z=7},
["there"] = {x=1162, y=691, z=7},
["hanz"] = {x=2161, y=1024, z=7},
["hell"] = {x=1340, y=1158, z=7},
} 

function onSay(cid, words, param, channel)
        local p = param:lower()
   if getPlayerPromotionLevel(cid) == 1 then
        if getCreatureCondition(cid,CONDITION_INFIGHT) == false then
                if to[p] ~= nil then
                        doTeleportThing(cid,to[p])
                        doSendMagicEffect(to[p],10)
                        doPlayerSendTextMessage(cid,4,"Teleported to "..p..".")
                else
                        doPlayerSendTextMessage(cid,4,"Invalid Location.")
                end
        else
                doPlayerSendTextMessage(cid,4,"Lose PZ.")
        end
else
doPlayerSendTextMessage(cid,4,"Sorry, you need promotion.")
end
        return true
end
 
Last edited:
Aright ..

LUA:
local to = {
["temple"] = {x=1063, y=607, z=7},
["depot"] = {x=1037, y=586, z=7}, 
["dp"] = {x=1037, y=586, z=7}, 
["teleports"] = {x=1158, y=689, z=7}, 
["jail"] = {x=1150, y=848, z=6}, 
["prek"] = {x=1381, y=593, z=7}, 
["cudz"] = {x=975, y=818, z=7}, 
["xypoz"] = {x=1657, y=1110, z=7}, 
["carlin"] = {x=1203, y=507, z=7}, 
["thais"] = {x=1062, y=581, z=7}, 
["tps"] = {x=1158, y=689, z=7}, 
["ship"] = {x=1006, y=576, z=6}, 
["desert"] = {x=873, y=632, z=6}, 
["trainers"] = {x=1095, y=793, z=8}, 
["train"] = {x=1109, y=441, z=7}, 
["donate"] = {x=987, y=420, z=7}, 
["arena"] = {x=1027, y=505, z=7}, 
["duel"] = {x=1137, y=702, z=7}, 
["island"] = {x=1030, y=798, z=7}, 
["die"] = {x=1650, y=1110, z=8},
["turtle"] = {x=2207, y=1484, z=7},
["yalahar"] = {x=1516, y=1172, z=7},
["edron"] = {x=2106, y=1499, z=8},
["stonehome"] = {x=2222, y=1438, z=7},
["port hope"] = {x=1763, y=1228, z=7},
["cuddle town"] = {x=1440, y=509, z=7},
["joez"] = {x=1639, y=727, z=6},
["udz"] = {x=1893, y=1442, z=7},
["godz"] = {x=1674, y=846, z=7},
["garden"] = {x=1619, y=585, z=7},
["crez"] = {x=1097, y=862, z=6},
["chuz"] = {x=1100, y=917, z=7},
["kelz"] = {x=1674, y=846, z=7},
["monument"] = {x=1095, y=1029, z=7},
["allyz"] = {x=1154, y=809, z=7},
["bar"] = {x=1234, y=725, z=7},
["battle"] = {x=1861, y=1200, z=7},
["lucz"] = {x=1038, y=789, z=7},
["there"] = {x=1162, y=691, z=7},
["hanz"] = {x=2161, y=1024, z=7},
["hell"] = {x=1340, y=1158, z=7},
} 

function onSay(cid, words, param, channel)
        local p = param:lower()
   if getPlayerPromotionLevel(cid) == 1 then
        if getCreatureCondition(cid,CONDITION_INFIGHT) == false then
                if to[p] ~= nil then
                        doTeleportThing(cid,to[p])
                        doSendMagicEffect(to[p],10)
                        doPlayerSendTextMessage(cid,4,"Teleported to "..p..".")
                else
                        doPlayerSendTextMessage(cid,4,"Invalid Location.")
                end
        else
                doPlayerSendTextMessage(cid,4,"Lose PZ.")
        end
else
doPlayerSendTextMessage(cid,4,"Sorry, you need promotion.")
end
        return true
end

Works fine, but could you make it so staffs can still use this command? ^^' it told me you need promotion on my god :3
 
Works fine, but could you make it so staffs can still use this command? ^^' it told me you need promotion on my god :3

LUA:
local to = {
["temple"] = {x=1063, y=607, z=7},
["depot"] = {x=1037, y=586, z=7}, 
["dp"] = {x=1037, y=586, z=7}, 
["teleports"] = {x=1158, y=689, z=7}, 
["jail"] = {x=1150, y=848, z=6}, 
["prek"] = {x=1381, y=593, z=7}, 
["cudz"] = {x=975, y=818, z=7}, 
["xypoz"] = {x=1657, y=1110, z=7}, 
["carlin"] = {x=1203, y=507, z=7}, 
["thais"] = {x=1062, y=581, z=7}, 
["tps"] = {x=1158, y=689, z=7}, 
["ship"] = {x=1006, y=576, z=6}, 
["desert"] = {x=873, y=632, z=6}, 
["trainers"] = {x=1095, y=793, z=8}, 
["train"] = {x=1109, y=441, z=7}, 
["donate"] = {x=987, y=420, z=7}, 
["arena"] = {x=1027, y=505, z=7}, 
["duel"] = {x=1137, y=702, z=7}, 
["island"] = {x=1030, y=798, z=7}, 
["die"] = {x=1650, y=1110, z=8},
["turtle"] = {x=2207, y=1484, z=7},
["yalahar"] = {x=1516, y=1172, z=7},
["edron"] = {x=2106, y=1499, z=8},
["stonehome"] = {x=2222, y=1438, z=7},
["port hope"] = {x=1763, y=1228, z=7},
["cuddle town"] = {x=1440, y=509, z=7},
["joez"] = {x=1639, y=727, z=6},
["udz"] = {x=1893, y=1442, z=7},
["godz"] = {x=1674, y=846, z=7},
["garden"] = {x=1619, y=585, z=7},
["crez"] = {x=1097, y=862, z=6},
["chuz"] = {x=1100, y=917, z=7},
["kelz"] = {x=1674, y=846, z=7},
["monument"] = {x=1095, y=1029, z=7},
["allyz"] = {x=1154, y=809, z=7},
["bar"] = {x=1234, y=725, z=7},
["battle"] = {x=1861, y=1200, z=7},
["lucz"] = {x=1038, y=789, z=7},
["there"] = {x=1162, y=691, z=7},
["hanz"] = {x=2161, y=1024, z=7},
["hell"] = {x=1340, y=1158, z=7},
} 
 
function onSay(cid, words, param, channel)
        local p = param:lower()
   if getPlayerPromotionLevel(cid) == 1 or getPlayerGroupId(cid) >= 4  then
        if getCreatureCondition(cid,CONDITION_INFIGHT) == false then
                if to[p] ~= nil then
                        doTeleportThing(cid,to[p])
                        doSendMagicEffect(to[p],10)
                        doPlayerSendTextMessage(cid,4,"Teleported to "..p..".")
                else
                        doPlayerSendTextMessage(cid,4,"Invalid Location.")
                end
        else
                doPlayerSendTextMessage(cid,4,"Lose PZ.")
        end
else
doPlayerSendTextMessage(cid,4,"Sorry, you need promotion.")
end
        return true
end
 
Back
Top