L2Tower Discord Let's keep the community alive with discord. Discussions about plugins and scripts L2Tower Discord

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
una ayudita por favor con esta script
Author Message
alberyan Offline
Zaken's Royal Guard
*

Posts: 52
Joined: Oct 2012
Reputation: 0
Version: 1.4.2.142
Post: #1
una ayudita por favor con esta script

    LUA Programming
ShowToClient("SYS","Script OOP Heal Melody Started");
CharNameToHeal = ""; --here write name of your Main to be heal
HPWhenHeal = 70; -- HP%
HealInRange = 750;
HealSkillId = 11755; -- Radiant Heal
ResSkillId = 11784; -- Blessed Resurrection
----------------------------------------------------------------
WhoToHeal = nil;
HealSkill = GetSkills():FindById(HealSkillId);
ResSkill = GetSkills():FindById(ResSkillId);
repeat
-----------
if(GetUserByName(CharNameToHeal) == nil)then
ShowToClient("SYS","Your main char is out of range, w8ing on him");
repeat
Sleep(1000);
until (GetUserByName(CharNameToHeal) ~= nil);
ShowToClient("SYS","Your main char is in range");
WhoToHeal = GetUserByName(CharNameToHeal);
elseif(GetUserByName(CharNameToHeal) ~= nil)then
WhoToHeal = GetUserByName(CharNameToHeal);
end;
----------
if(WhoToHeal:GetHpPercent() < HPWhenHeal) and
(GetMe():GetRangeTo(WhoToHeal) < HealInRange) and
(HealSkill ~= nil) and (HealSkill:CanBeUsed())then
Target(WhoToHeal);
Sleep(200);
UseSkill(HealSkillId); -- Healing Melody
ClearTargets();
end;
--------------
if(GetUserByName(CharNameToHeal):IsAlikeDeath() == true) and
(GetMe():GetRangeTo(WhoToHeal) < HealInRange) and
(ResSkill ~= nil) and
(ResSkill:CanBeUsed()) then
Target(WhoToHeal);
Sleep(300);
UseSkillRaw(11784, false, false); -- Angel's Resurrection
end;
Sleep(500);
until false;




se para a cada rato, colocando este mensaje:
script error: Lua error (script no valid) - [string "show toclient (sys", "script OOP Heal Melody st.."]:33: attemp to index a nill value.

agradesco la ayuda.
(This post was last modified: 11-11-2015 16:03 PM by TheQQmaster.)
11-11-2015 05:22 AM
Find all posts by this user Quote this message in a reply
rORUMI Offline
Expired VIP Member
**

Posts: 278
Joined: May 2014
Reputation: 50
Version: 1.4.2.142
Post: #2
RE: una ayudita por favor con esta script

Hay varios factores que pueden hacerte colgar el script ya que no tiene verificaciones en caso de errores.

Ahora simplemente te equivocaste en el nombre del personaje (lo cual lo hace nil) en la configuracion del Script y/o estas forzando cada medio segundo GetUserByName(CharNameToHeal) lo cual puede dar error con el tiempo.
(This post was last modified: 11-11-2015 10:38 AM by rORUMI.)
11-11-2015 10:32 AM
Find all posts by this user Quote this message in a reply
alberyan Offline
Zaken's Royal Guard
*

Posts: 52
Joined: Oct 2012
Reputation: 0
Version: 1.4.2.142
Post: #3
RE: una ayudita por favor con esta script

gracias compadre
11-12-2015 00:31 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Ayuda por favor ? me tira critical error lauchita92 0 1,606 10-30-2019 16:25 PM
Last Post: lauchita92
Big Grin Ayudita con un scrip de auto farm lucasdrag 1 2,332 04-25-2016 04:58 AM
Last Post: either
  ayuda por favor cbanico22 1 1,758 12-07-2015 20:43 PM
Last Post: rORUMI
  AYUDA POR FAVOR! ERROR PROTOCOLO ScreamScense 1 1,910 07-31-2015 18:47 PM
Last Post: rORUMI
  Ayuda por Favor carlosmb 0 1,188 12-15-2014 23:17 PM
Last Post: carlosmb
  Ayuda por favor con la script de iss alberyan 2 1,971 09-01-2014 04:37 AM
Last Post: alberyan
  Ingreso y 5 segundos me sale este mensaje... ayuda por favor Pepetolo 3 2,419 03-03-2014 09:20 AM
Last Post: znavalha
  AYUDA POR FAVOR morita 1 1,890 07-24-2013 04:11 AM
Last Post: Faraon
Heart Busco Script/Find Script brianheick 3 4,013 07-15-2013 04:55 AM
Last Post: Faraon
Tongue alguno tiene esta script??? luchocroci 2 2,623 06-13-2013 02:16 AM
Last Post: alberyan



User(s) browsing this thread: 1 Guest(s)