olá gente estou com um problema na verdade 4... eu queria colocar os seguintes comandos só para vips usar que no caso a storage da vip é 88888
casa.lua - vai até sua casa desde que não esteja com battle:
function isWalkable(pos, creature, proj, pz)-- by Nord if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTopCreature(pos).uid > 0 and creature then return false end if getTileInfo(pos).protection and pz then return false, true end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function onSay(cid, words) if not getHouseByPlayerGUID(getPlayerGUID(cid)) then return doPlayerSendCancel(cid, "Voce nao tem casa.") end local pos = getHouseEntry(getHouseByPlayerGUID(getPlayerGUID(cid))) if getCreatureCondition(cid, CONDITION_INFIGHT) then return doPlayerSendCancel(cid, "Voce tem que estar sem battle.") end if not getTilePzInfo({x=pos.x-1, y=pos.y, z=pos.z}) and isWalkable({x=pos.x-1, y=pos.y, z=pos.z}) then pos = {x=pos.x-1, y=pos.y, z=pos.z} elseif not getTilePzInfo({x=pos.x+1, y=pos.y, z=pos.z}) and isWalkable({x=pos.x+1, y=pos.y, z=pos.z}) then pos = {x=pos.x+1, y=pos.y, z=pos.z} elseif not getTilePzInfo({x=pos.x, y=pos.y+1, z=pos.z}) and isWalkable({x=pos.x, y=pos.y+1, z=pos.z}) then pos = {x=pos.x, y=pos.y+1, z=pos.z} elseif not getTilePzInfo({x=pos.x, y=pos.y-1, z=pos.z}) and isWalkable({x=pos.x, y=pos.y-1, z=pos.z}) then pos = {x=pos.x, y=pos.y-1, z=pos.z} end doTeleportThing(cid, pos) end
tirar pk.lua - comando para tirar o pk white black e red
--50% kung lao %50 Vodkart function onSay(cid, words, param) local S = { [3] = {price = 1000000,cobrar = true,msg = "Você perdeu seu white skull e frags.", premium = true}, [4] = {price = 3000000,cobrar = true,msg = "Você perdeu seu red skull e frags", premium = true}, [5] = {price = 5000000,cobrar = true,msg = "Você perdeu seu black skull e frags", premium = true}, } local skull = S[getCreatureSkullType(cid)] if(not skull) then doPlayerSendCancel(cid,"Você nao está com nenhum tipo de skull.") return TRUE elseif skull.premium == true and not isPremium(cid) then doPlayerSendCancel(cid,"Apenas players premium podem remover skull.") return TRUE elseif skull.cobrar == true and doPlayerRemoveMoney(cid, skull.price) == FALSE then doPlayerSendCancel(cid,"Você não tem " .. skull.price .. " gps para remover sua skull.") doSendMagicEffect(getPlayerPosition(cid), 2) return TRUE end db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")") doCreatureSetSkullType(cid, 0) doRemoveCreature(cid) doPlayerSendTextMessage(cid, 22,skull.msg) doSendMagicEffect(getPlayerPosition(cid), 26) return TRUE end
outfit.lua - muda outfit do player para a que ele quiser menos as de GOD, CM e GM!
function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return true end local t = string.explode(param, ",") t[1] = tonumber(t[1]) if(not t[1]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires numeric param.") return true end local failout = {"66","302","56","45","10"} -- outfits proibidas for i = 1, #failout do if string.find(tostring(param), failout[i]) then doPlayerSendCancel(cid,"Não pode usar estas outfit.") return TRUE end end if(t[1] <= 1 or t[1] == 135 or (t[1] > 160 and t[1] < 192) or t[1] > 351) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Such outfit does not exist.") return true end local tmp = getCreatureOutfit(cid) tmp.lookType = t[1] doCreatureChangeOutfit(cid, tmp) return true end
changesex.lua - para mudar de sexo
local config = { costPremiumDays = 3 } function onSay(cid, words, param, channel) if(getPlayerSex(cid) >= 2) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot change your gender.") return TRUE end if(getPlayerPremiumDays(cid) < config.costPremiumDays) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, not enough premium time- changing gender costs " .. config.costPremiumDays .. " days.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return TRUE end if(getPlayerPremiumDays(cid) < 65535) then doPlayerAddPremiumDays(cid, -config.costPremiumDays) end if(getPlayerSex(cid) == PLAYERSEX_FEMALE) then doPlayerSetSex(cid, PLAYERSEX_MALE) else doPlayerSetSex(cid, PLAYERSEX_FEMALE) end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have changed your gender and lost " .. config.costPremiumDays .. " days of premium time.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED) return TRUE end