Postado Abril 25, 2013 12 anos Olá amigos estou tentando adicionar o Scripts para deixa mana ful e hp ful quando char upa. -- by Shoeei for OTServ Brásil Fórums -- function onAdvance(cid, skill, oldlevel, newlevel) if skill == SKILL__LEVEL then local maxh = getCreatureMaxHealth(cid) local maxm = getCreatureMaxMana(cid) doCreatureAddHealth(cid, maxh) doCreatureAddMana(cid, maxm) end return true end Estou testando aqui e não esta deixando a mana ful e nem o hp. e nao da neum erro no Distro nem nada. Alguém ? http://www.serversoft.com.br/painel/aff.php?aff=016
Postado Abril 25, 2013 12 anos Em meu servidor de testes esse funciona perfeitamente. local config = { savePlayer = true, healPlayerOnLevel = true } function onAdvance(cid, skill, oldLevel, newLevel) if(skill == SKILL__EXPERIENCE) then return true end if(skill == SKILL__LEVEL and config.healPlayerOnLevel) then doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid)) end if(config.savePlayer) then doPlayerSave(cid, true) end return true end Att. Giovani Rodrigo Editado Abril 25, 2013 12 anos por GiovaniRodrigo (veja o histórico de edições) Spoiler local config = { delrey = getPlayerCarValue(cid, DELREY), cigarro = getPlayerCancer(cid, DERBY), prostituta = getPlayerAIDS(cid, cracuda), tresOitao = getPlayerRevorvi(cid, 38) } if(delrey == "Ligado" and cigarro == "Aceso" and prostituta == "No Colo" and tresOitao == "Carregado") then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Começou o fim de semana. #PAS") end
Postado Abril 25, 2013 12 anos Autor esse ai é creaturescripts ? http://www.serversoft.com.br/painel/aff.php?aff=016
Postado Abril 25, 2013 12 anos esse ai é creaturescripts ? Sim, é creaturescripts. Ai esta a tag dele, caso precisar <event type="advance" name="AdvanceSave" event="script" value="advancesave.lua"/> Att. Giovani Rodrigo Editado Abril 25, 2013 12 anos por GiovaniRodrigo (veja o histórico de edições) Spoiler local config = { delrey = getPlayerCarValue(cid, DELREY), cigarro = getPlayerCancer(cid, DERBY), prostituta = getPlayerAIDS(cid, cracuda), tresOitao = getPlayerRevorvi(cid, 38) } if(delrey == "Ligado" and cigarro == "Aceso" and prostituta == "No Colo" and tresOitao == "Carregado") then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Começou o fim de semana. #PAS") end
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.