-
Total de itens
98 -
Registro em
-
Última visita
Tudo que nari postou
-
Alguem Me Ajdua Fazendo O Script Para Esse Slot System?
um tópico no fórum postou nari Lixeira Pública
Explicação: Pra quem conhece o sistema do mock, é praticamente igual, porém menos poggado, e também é possível a configuração de várias pedras, chamadas sloters (só pra por um bendito nome), portanto os bonus não são randômicos. Script: Crie algum arquivo .lua em data/lib e adcione isso: SlotCondition = {} Slots = { config = { maxSlots = 2, msg = { type = MESSAGE_STATUS_DEFAULT, cantOpenSlot = "You cant open a slot on this item, or this isn't a valid sloter.", maxStat = "You can't add more bonus on this item with this sloter.", upgrade = "You upgrated the %s slot from %s to %s.", failed = "You failed upgrading the slot.", errorMsg = "Put the item on the table, and then the sloter, and use the hammer on it." }, conditions = { hp = {CONDITION_PARAM_STAT_MAXHEALTHPERCENT, 50}, mp = {CONDITION_PARAM_STAT_MAXMANAPERCENT, 51}, ml = {CONDITION_PARAM_STAT_MAGICLEVELPERCENT, 52}, club = {CONDITION_PARAM_SKILL_CLUBPERCENT, 53}, sword = {CONDITION_PARAM_SKILL_SWORDPERCENT, 54}, axe = {CONDITION_PARAM_SKILL_AXEPERCENT, 55}, shield = {CONDITION_PARAM_SKILL_SHIELDPERCENT, 56}, dist = {CONDITION_PARAM_SKILL_DISTANCEPERCENT, 57} }, chance = function(level, status, max) return 1-(1-((level/5) - (status/max))) end }, sloters = { [8303] = {"hp", {1, 15, 6}}, [8302] = {"mp", {1, 8, 5}}, [8301] = {"ml", {1, 4, 5}}, [8310] = {"club", {1, 6, 6}}, [8299] = {"sword", {1, 6, 6}}, [8298] = {"axe", {1, 6, 6}}, [8309] = {"shield", {1, 4, 5}}, [8297] = {"dist", {1, 5, 5}} }, appendItemName = function(self, txt) return self:setItemName(self:getItemName() .. " " .. txt) end, playerMessage = function(self, cid, msg, ...) return doPlayerSendTextMessage(cid, self.config.msg.type, self.config.msg[msg]:format(...)) end, isHandEquipment = function(self) local weptype = self:getItemWeaponType() return (weptype > 0) and (weptype < 7) end, isEquipment = function(self) return self:isHandEquipment() or (self.item.info.armor ~= 0) end, loadConditions = function(self) for cond, id in pairs(self.config.conditions) do SlotCondition[cond] = {} for i = 1, 100 do local slotCondition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(slotCondition, CONDITION_PARAM_TICKS, -1) setConditionParam(slotCondition, id[1], 100+i) setConditionParam(slotCondition, CONDITION_PARAM_BUFF, true) setConditionParam(slotCondition, CONDITION_PARAM_SUBID, id[2]) SlotCondition[cond] = slotCondition end end end, setItemName = function(self, name) return doItemSetAttribute(self.item.uid, "name", name) end } Slots:loadConditions() function Slots:loadItem(item) local newObj = setmetatable({item = {uid = item.uid, info = getItemInfo(item.itemid)}}, {__index = function(self, index) if(_G[index]) then return setmetatable({callback = _G[index]}, {__call = function(self, ...) return self.callback(item.uid, ...) end}) else return Slots[index] end end}) if(not newObj:isEquipment()) then return false end newObj:getItemSlotCount() return newObj end function Slots:getItemSlotCount() local e, n = self:getItemName():gsub("%[.-%]", "") self.item.slotCount = n return true end function Slots:getItemStatusBonus(status) local bonus = self:getItemName():match("%[".. status .."%+(.-)%%%]") return tonumber(bonus) or 0 end function Slots:getItemBonus() local result = {} self:getItemName():gsub("%[(.-)%+.-%%%]", function(s) table.insert(result, {s, self:getItemStatusBonus(s)}) return "" end) return result end function Slots:openNewSlot(cid, sloter) local sloterInfo = self.sloters[sloter.itemid] if(not sloterInfo) then self:playerMessage(cid, "errorMsg") return false end local statusBonus = self:getItemStatusBonus(sloterInfo[1]) if((statusBonus == 0) and self.item.slotCount == self.config.maxSlots) then self:playerMessage(cid, "cantOpenSlot") return false end if(self:isEquipment()) then if(statusBonus >= sloterInfo[2][2]) then self:playerMessage(cid, "maxStat") return false end doRemoveItem(sloter.uid, 1) if(math.random(0, 100) < (self.config.chance(sloterInfo[2][3], statusBonus, sloterInfo[2][2]) * 100)) then if(statusBonus > 0) then self:setItemName(self:getItemName():gsub("%[".. sloterInfo[1] .."%+(.-)%%%]", ("[%s+%s%%]"):format(sloterInfo[1], statusBonus + sloterInfo[2][1] .. "%"))) else self:appendItemName(("[%s+%s%%]"):format(sloterInfo[1], statusBonus + sloterInfo[2][1])) end self:playerMessage(cid, "upgrade", sloterInfo[1], statusBonus .. "%", statusBonus + sloterInfo[2][1] .. "%") return true end self:playerMessage(cid, "failed") return false else self:playerMessage(cid, "cantOpenSlot") return false end end Set = { config = { checkTime = 2000 }, isOnline = function(self) local players = getOnlinePlayers() for i, v in ipairs(players) do if(getCreatureByName(v) == self.cid) then return true end end return false end } function Set:loadSetFromPlayer(cid, n) local newSet = setmetatable({cid = cid}, {__index = self}) return n and newSet:loadBonus() or newSet:removeConditions() end function Set:removeConditions(subid) if(subid) then doRemoveCondition(self.cid, CONDITION_ATTRIBUTES, subid) return true end for cond, id in pairs(Slots.config.conditions) do doRemoveCondition(self.cid, CONDITION_ATTRIBUTES, id[2]) end end function Set:loadBonus() if(not self:isOnline()) then return false end for subid = 50, #Slots.config.conditions do doRemoveCondition(self.cid, CONDITION_ATTRIBUTES, subid) end local bonus = {} for slot = 1, 9 do local slotItem = getPlayerSlotItem(self.cid, slot) if(slotItem.itemid ~= 0) then local item = Slots:loadItem(slotItem) if(item) then for i, v in ipairs(item:getItemBonus()) do if((slot == 5) or (slot == 6)) then if(item:isHandEquipment()) then bonus[v[1]] = (bonus[v[1]] or 0) + v[2] end else bonus[v[1]] = (bonus[v[1]] or 0) + v[2] end end end end end for cond, id in pairs(Slots.config.conditions) do if(bonus[cond]) then local v = (cond == "hp") and getCreatureHealth(self.cid) or (cond == "mp") and getCreatureMana(self.cid) doAddCondition(self.cid, SlotCondition[cond][bonus[cond] > 100 and 100 or bonus[cond]]) doCreatureAddHealth(self.cid, (cond == "hp") and (v - getCreatureHealth(self.cid)) or 0) doCreatureAddMana(self.cid, (cond == "mp") and (v - getCreatureMana(self.cid)) or 0) else doRemoveCondition(self.cid, CONDITION_ATTRIBUTES, id[2]) end end addEvent(self.loadBonus, self.config.checkTime, self) end -
ah sim, obrigado
-
funcionou, porem entra so pelo ip numerico como faso para ir pelo fixo?
-
preciso de ajuda o site nao abre para os outros criarem a acc, ele abre apenas para mim com http://localhost eu ja liberei as portas 80, 8090, 7171, 7172 no firewall e no roteador o q eu faso? uso gesior 0.3.8
-
mas ai a paralyze vai ser mandada de longe ou so de perto?
-
quando a vip acaba o player nao esta perdendo a promotion vip
- 672 respostas
-
- vip system
- war system
-
(e 7 mais)
Tags:
-
muito bom trabalho.... vc esta de parabens, eh uma pena q esse seja o ultimo q vc esta atualizando........ mas vlw... continue assim =]
- 672 respostas
-
- vip system
- war system
-
(e 7 mais)
Tags:
-
vai liberar ele aki mesmo? estou aguardando =D ansiosamente
- 672 respostas
-
- vip system
- war system
-
(e 7 mais)
Tags:
-
como faso para o player perder a promotion com o fim da vip?
-
@Vodkart mano gostaria de sabe se tem como a vip ir para a acc inteira e nao apenas para um char
-
ae funcionou, obrigado + rep
-
-- Script SYtem vip 1.0 -- function onSay(cid, words, param) if(words == "!buyvip") then local price = 3000000 if doPlayerRemoveMoney(cid, 3000000) == TRUE then local days = 30 local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 13540) local timenow = os.time() if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.") setPlayerStorageValue(cid, 13540, time) local quantity = math.floor((getPlayerStorageValue(cid, 13540) - timenow)/(24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa de "..price.." gp's para colocar vip.") end elseif(words == "!vipdays") then local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(cid, 13540) - timenow)/(24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. (quantity < 0 and 0 or quantity) .." dias de VIP no seu character.") elseif(words == "/checkvip") then if getPlayerAccess(cid) == 5 then if not param then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end local player = getPlayerByName(param) local pid = getPlayerByNameWildcard(param) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(player, 13540) - timenow)/(24 * 60 * 60)) doPlayerPopupFYI(cid, "O jogador tem ".. (quantity < 0 and 0 or quantity) .." dias de VIP no character.") return TRUE end elseif(words == "/addvip") then if getPlayerAccess(cid) == 5 then local t = string.explode(param, ",") if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end local player = getPlayerByName(t[1]) local days = t[2] local pid = getPlayerByNameWildcard(t[1]) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end local daysvalue = days*3600*24 local storageplayer = getPlayerStorageValue(player, 13540) local timenow = os.time() local time = storageplayer <= 0 and (timenow + daysvalue) or (storageplayer + daysvalue) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Foram adicionados "..days.." dias de VIP no seu character.") setPlayerStorageValue(player, 13540, time) local quantity = math.floor((getPlayerStorageValue(player,13540) - timenow)/(3600*24)) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você tem "..quantity.." dias de VIP restantes.") end elseif(words == "/delvip") then if getPlayerAccess(cid) == 5 then local dec = MESSAGE_INFO_DESCR if(param == "") then return TRUE,doPlayerSendTextMessage(cid,18,"Command param required.")end local C,t = {},string.explode(param, ",") C.pos = getPlayerPosition(cid) C.uid = getCreatureByName(t[1]) C.time = ((tonumber(t[2]) == nil) and 1 or tonumber(t[2]))*3600*24 --Tempo da vip por dia. C.days = (tonumber(t[2]) == nil) and 1 or tonumber(t[2]) --Dias de vip. local pid = getPlayerByNameWildcard(t[1]) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end if(getPlayerStorageValue(C.uid,13540) < C.time)then doPlayerSendTextMessage(cid,dec,'O jogador '..t[1]..' não possui '..C.days..' dias de vip.') else doPlayerSendTextMessage(cid,dec,'Você removeu '..C.days..' dias de vip do player '..t[1]..'.') setPlayerStorageValue(C.uid,13540,getPlayerStorageValue(C.uid,13540)-C.time) end doSendMagicEffect(C.pos, math.random(28,30)) end end return TRUE end
-
tou usando o baiak do miguel223, nao sei te falar qual sistema, como eu vejo?
-
presiso de um script que quando a vip do player acabar ele perde a promotion e volta para o templo. Exemplo se o pplayer for elite knight ele volta a ser knight e vai para o templo. Estou usando o serve Baiak
-
@Vmspk fmz cara, continua com seu trabalho pq seu ot eh muito bom (y)
-
:S blz cara brigadao, + rep pra ti parceiro
-
Vodkart eu não consegui utilizar, o player pega lvl 30 e nao ganha 20k, eu utilizo o ot Real Global Map 2.2 do DoohRush
-
to atraz de um creaturescripts que quando o player pega um certo level ganha item ou dinheiro. por exemplo: quando ele avançar lvl 30 ganhar 20k. quem souber ajuda ai (y)
-
@Vmspk quando sai o novo update? ele vai ter as spells novas?
-
ae cara, o ot ta muito bom mesmo... mas só tem um problema.... os itens q sao colocados nas houses nao tao sendo salvos, quando fexo o ot eles somem, como posso arrumar isso? vlw
-
Quando Vip Acabar,ser Teleportado Para O Templo
tópico respondeu ao Vodkart de nari em Globalevents e Spells
Vodkart muito bom esse script.... mas tipo quando acabar a vip, tem como fazer com que o player perca as promotions? -
nivel 2 , usar a magia 1000 veses nivel 3, usar a magia +5000 veses nivel 4, usar a magia +10000 veses como diminuo ou aumento o numero de vezes para subir de nivel?
-
[Linkquebrado] Styller Yourots New 0.6 (8.4) E (8.42)
tópico respondeu ao leoloko12 de nari em Lixeira Pública
ow cara fmz? n deu para entrae em nenhum acc da "invalit account" name um treko isso ae o q eu faso? -
Boa mulek gostei nota 10....continue assim
-
8.1 The New Yourots By Shynzo Agora Totalmente Corrigido
tópico respondeu ao zimbituba de nari em Lixeira Pública
no meu tbm da a mesma coisa e fala q eh virus......EU QUERO JOGA!!!!
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.