Postado Fevereiro 20, 2017 8 anos 1 minuto atrás, Weslley Kiyo disse: Troca if type == STATSCHANGE_HEALTHLOSS and isPlayer(cid) and isCreature(attacker) then Por essa if type == STATSCHANGE_HEALTHLOSS or STATSCHANGE_MANALOSS and isPlayer(cid) and isCreature(attacker) then vlw ^^(to sem rep+ por hj) GitHub: https://github.com/s3kk Conteúdo: [SERVER] Heromassa[GESIOR] Gesior 2012 modificado por Sekk[GESIOR] Shop Addons & Mounts - TFS 1.x[GESIOR] Outfitter para Characters e Rank[SISTEMA] Castle 24h[TALKACTION] Multi Element Wand[ACTION] Multi Elemental Arrow & Shield[PROGRAMAÇÃO] Compilar TFS 0.4 no Linux[PROGRAMAÇÃO] Compilando TFS 0.4 no MSVC(x64 e x32) [INFRAESTRUTURA] Configuração COMPLETA Google VM + Tibia 11.x
Postado Fevereiro 20, 2017 8 anos 8 minutos atrás, Weslley Kiyo disse: Nudes? HEUEHUEHUE AUHAUHAUAHAUAHAU sou cabra macho tio Edit.: Como eu sou um inútil da vida, eu gosto de ficar fuçando nas coisas e deixei o script em mod, se alguem quiser, ta ai: <?xml version="1.0" encoding="utf-8"?> <mod name="Reflect System" version="1.0" author="Sekk" enabled="yes"> <config name="rc"><![CDATA[ local config = { chance = 100, -- chance de sair o reflect (1 = 1% de chance) valor_reflect = 15, -- % do dano do reflect storage = 45455 -- storage do reflect } ]]></config> <event type="login" name="Reflect_Login" event="script"><![CDATA[ domodlib('rc') function onLogin(cid) registerCreatureEvent(cid, "reflect") return true end]]></event> <event type="statschange" name="reflect" event="script"><![CDATA[ domodlib('rc') function onStatsChange(cid, attacker, type, combat, value) if getPlayerStorageValue(cid, config.storage) > 0 then if type == STATSCHANGE_HEALTHLOSS or STATSCHANGE_MANALOSS and isPlayer(cid) and isCreature(attacker) then if math.random (1,100) <= config.chance then doCreatureSay(cid, "Reflect!", TALKTYPE_MONSTER_SAY) local danoReflect = value * (config.valor_reflect/100) doTargetCombatHealth(cid, attacker, COMBAT_PHYSICALDAMAGE, -danoReflect, -danoReflect, CONST_ME_EXPLOSIONAREA) return true end end end return true end]]></event> </mod> Editado Fevereiro 20, 2017 8 anos por Sekk (veja o histórico de edições) GitHub: https://github.com/s3kk Conteúdo: [SERVER] Heromassa[GESIOR] Gesior 2012 modificado por Sekk[GESIOR] Shop Addons & Mounts - TFS 1.x[GESIOR] Outfitter para Characters e Rank[SISTEMA] Castle 24h[TALKACTION] Multi Element Wand[ACTION] Multi Elemental Arrow & Shield[PROGRAMAÇÃO] Compilar TFS 0.4 no Linux[PROGRAMAÇÃO] Compilando TFS 0.4 no MSVC(x64 e x32) [INFRAESTRUTURA] Configuração COMPLETA Google VM + Tibia 11.x
Postado Fevereiro 20, 2017 8 anos 1 minuto atrás, Sekk disse: AUHAUHAUAHAUAHAU sou cabra macho tio Ainnn adoro cabra machoo *-* HEUEHUE Acho que tamo violando as regras, mas é por amor
Postado Fevereiro 20, 2017 8 anos 29 minutos atrás, Sekk disse: AUHAUHAUAHAUAHAU sou cabra macho tio Edit.: Como eu sou um inútil da vida, eu gosto de ficar fuçando nas coisas e deixei o script em mod, se alguem quiser, ta ai: <?xml version="1.0" encoding="utf-8"?> <mod name="Reflect System" version="1.0" author="Sekk" enabled="yes"> <config name="rc"><![CDATA[ local config = { chance = 100, -- chance de sair o reflect (1 = 1% de chance) valor_reflect = 15, -- % do dano do reflect storage = 45455 -- storage do reflect } ]]></config> <event type="login" name="Reflect_Login" event="script"><![CDATA[ domodlib('rc') function onLogin(cid) registerCreatureEvent(cid, "reflect") return true end]]></event> <event type="statschange" name="reflect" event="script"><![CDATA[ domodlib('rc') function onStatsChange(cid, attacker, type, combat, value) if getPlayerStorageValue(cid, config.storage) > 0 then if type == STATSCHANGE_HEALTHLOSS or STATSCHANGE_MANALOSS and isPlayer(cid) and isCreature(attacker) then if math.random (1,100) <= config.chance then doCreatureSay(cid, "Reflect!", TALKTYPE_MONSTER_SAY) local danoReflect = value * (config.valor_reflect/100) doTargetCombatHealth(cid, attacker, COMBAT_PHYSICALDAMAGE, -danoReflect, -danoReflect, CONST_ME_EXPLOSIONAREA) return true end end end return true end]]></event> </mod> To usando como mod, e ta dando esse erro quando algum bicho me ataca. Citar [Error - CreatureScript Interface] buffer:onStatsChange Description: [string "loadBuffer"]:4: attempt to index global 'config' (a nil value) stack traceback: [string "loadBuffer"]:4: in function <[string "loadBuffer"]:3>
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.