Jump to content
  • 0

help Wave Mode Instance


Question

Posted
 
Hello , I am trying to develop instance wave mode and I'm going through some problems . The first is to make a monster getting straight. Does anyone know anything about it? I've checked a few posts and it seems that no instructions in rA to perform this task . I would love to create that body and spread to the community.
Link used iRO:

 
 
up a link here from rA talking a little about .. Someone had already developed something like this ?
 
 

3 answers to this question

Recommended Posts

  • 0
Posted

you required some kind of monster AI controller script. It exist in old eAthena time. You probably still able to find the source mod released by annieruru somewhere in rAthena or maybe Hercules.

  • 0
Posted (edited)

you required some kind of monster AI controller script. It exist in old eAthena time. You probably still able to find the source mod released by annieruru somewhere in rAthena or maybe Hercules.

 

 
Like this ?

https://rathena.org/board/topic/70192-monster-defense/

 

 

Edit: 

 
I'm editing this script, but can not make the monsters walk straight ..
 
 They are walking from one side to another and do not know how to avoid /sob

 

//Author Goddameit

//Version 2012/08/25

//Web http://bit.ly/RMReEj

prontera,150,180,4 script Defense Mob Event 100,{

if(getmapusers("1@def01")||!getcharid(1))

end;

Set $@pid_event_dfmob,getcharid(1);

warpparty "1@def01",50,21,$@pid_event_dfmob;

mapwarp "1@def01","prontera",150,180;

donpcevent "Defense Mob Event::OnEventStar";

end;

OnEventStar:

bg_updatescore "1@def01",0,0;

sleep 5000;

callsub OnDelWall;

//setwall "1@def01",25,48,4,0,0,"Wall_DefMob_Event_1";//

//setwall "1@def01",74,48,4,0,0,"Wall_DefMob_Event_2";//

//setwall "1@def01",48,74,4,6,0,"Wall_DefMob_Event_3";//

//setwall "1@def01",48,25,4,6,0,"Wall_DefMob_Event_4";//

bg_monster(2,"1@def01",50,21,"--ja--",1083,"Defense Mob Event::OnGameOver");

bg_updatescore "1@def01",0,0;

initnpctimer "DefMob_Event_Walk";

initnpctimer "DefMob_Event_Warp";

initnpctimer;

end;

OnLevelStart:

//setarray .@lv_amount[0],10,12,13,15,20;

setarray .@lv_amount[0],2,2,2,2,2;

for(set .@i,1;.@i<=4;set .@i,.@i+1)

{

for(set .@j,0;.@j<.@lv_amount[.level-1];set .@j,.@j+1)

callsub OnSpawn,.@i,.@j,1002;

}

return;

OnTimer5000:

if(!$@pid_event_dfmob)

{

donpcevent "Defense Mob Event::OnGameOver";

set .level,0;

}

getpartymember $@pid_event_dfmob,0;

set .@partymembercount,$@partymembercount;

copyarray .@partymembername$[0],$@partymembername$[0],.@partymembercount;

set .@j,0;

for(set .@i,0;.@i<.@partymembercount;set .@i,.@i+1)

{

if(attachrid(getcharid(3,.@partymembername$[.@i])))

{

if(HP==0)

set .@j,.@j+1;

}else

set .@j,.@j+1;

}

if(.@j>=.@partymembercount)

{

Announce "vv",0;

donpcevent "Defense Mob Event::OnGameOver";

set .level,0;

}

if(getmapmobs("1@def01")==1)

{

set .level,.level+1;

if(.level>=5)

{

donpcevent "Defense Mob Event::OnGameOver";

end;

}

callsub OnLevelStart;

}

initnpctimer;

end;

OnGameOver:

if(.level>=5)

MapAnnounce "1@def01","You Win!!",0;

else

MapAnnounce "1@def01","You lose!!",0;

sleep 5000;

mapwarp "1@def01","prontera",150,180;

callsub OnDelWall;

Set $@pid_event_dfmob,0;

set .level,0;

stopnpctimer;

stopnpctimer "DefMob_Event_Walk";

stopnpctimer "DefMob_Event_Warp";

killmonsterall "1@def01";

end;

OnDelWall:

//delwall "Wall_DefMob_Event_1";

//delwall "Wall_DefMob_Event_2";

//delwall "Wall_DefMob_Event_3";

//delwall "Wall_DefMob_Event_4";

return;

OnSpawn:

switch(getarg(0))

{

case 1:

set .x,50;

set .y,75;

break;

case 2:

set .x,50;

set .y,75;

break;

case 3:

set .x,50;

set .y,75;

break;

case 4:

set .x,50;

set .y,75;

break;

}

setd ".Wave_"+getarg(0)+"["+getarg(1)+"]",bg_monster(1,"1@def01",.x+rand(-3,3),.y+rand(-3,3),"--ja--",getarg(2),"");

return;

}

function script inarea { //x,y,x1,y1,x2,y2

if( getarg(2) <= getarg(0) && getarg(0) <= getarg(4) && getarg(3) <= getarg(1) && getarg(1) <= getarg(5) )

return 1;

else

return 0;

}

1@def01,0,0,0 script DefMob_Event_Walk -1,{

OnTimer500:

if(!$@pid_event_dfmob)

end;

for(set .@i,1;.@i<=4;set .@i,.@i+1)

{

for(set .@j,0;.@j<10;set .@j,.@j+1)

{

set .@n,getmapmobs("1@def01");

bg_updatescore "1@def01",.@n/100,.@n%100;

set .@g,getvariableofnpc(getd(".Wave_"+.@i+"["+.@j+"]"),"Defense Mob Event");

if(!.@g)

continue;

if(getmobxy(.@g,.@data))

{

if(distance(.@data[0],.@data[1],50,21)<3)//

{

unitskilluseid .@g,173,1;

continue;

}

//if(callfunc("inarea",.@data[0],.@data[1],48,77,53,21))

//{

// unitwalk .@g,50,21;

// continue;

//}

//

if(callfunc("inarea",.@data[0],.@data[1],48,77,52,21))

{

unitwalk .@g,rand(49,51),.@data[1]-1;

continue;

}

/*

if(callfunc("inarea",.@data[0],.@data[1],46,4,53,11))

{

unitwalk .@g,50,12;

continue;

}

if(callfunc("inarea",.@data[0],.@data[1],48,12,51,24))

{

unitwalk .@g,rand(48,51),.@data[1]+1;

continue;

}

//

if(callfunc("inarea",.@data[0],.@data[1],46,88,53,95))

{

unitwalk .@g,50,87;

continue;

}

if(callfunc("inarea",.@data[0],.@data[1],48,75,51,87))

{

unitwalk .@g,rand(48,51),.@data[1]-1;

continue;

}

//

if(callfunc("inarea",.@data[0],.@data[1],4,46,11,53))

{

unitwalk .@g,12,49;

continue;

}

if(callfunc("inarea",.@data[0],.@data[1],12,48,24,51))

{

unitwalk .@g,.@data[0]+1,rand(48,51);

continue;

}

//

if(callfunc("inarea",.@data[0],.@data[1],88,46,95,53))

{

unitwalk .@g,87,49;

continue;

}

if(callfunc("inarea",.@data[0],.@data[1],75,48,87,51))

{

unitwalk .@g,.@data[0]-1,rand(48,51);

continue;

}

//

if(callfunc("inarea",.@data[0],.@data[1],41,41,58,58))

{

unitwalk .@g,50,50;

continue;

}

//

if(callfunc("inarea",.@data[0],.@data[1],58,58,69,69))

{

unitwalk .@g,54,54;

continue;

}

//

if(callfunc("inarea",.@data[0],.@data[1],30,58,41,69))

{

unitwalk .@g,45,54;

continue;

}

//

if(callfunc("inarea",.@data[0],.@data[1],58,30,69,41))

{

unitwalk .@g,54,45;

continue;

}

//

if(callfunc("inarea",.@data[0],.@data[1],30,30,41,41))

{

unitwalk .@g,45,45;

continue;

}

//

if(callfunc("inarea",.@data[0],.@data[1],54,54,58,58))

{

unitwalk .@g,54,54;

continue;

}

//

if(callfunc("inarea",.@data[0],.@data[1],41,54,45,58))

{

unitwalk .@g,45,54;

continue;

}

//

if(callfunc("inarea",.@data[0],.@data[1],54,41,58,45))

{

unitwalk .@g,54,45;

continue;

}

//

if(callfunc("inarea",.@data[0],.@data[1],41,41,45,45))

{

unitwalk .@g,45,45;

continue;

}

//

//

if(callfunc("inarea",.@data[0],.@data[1],26,43,37,49))

{

unitwalk .@g,rand(30,37),.@data[1]-rand(3,5);

}

//

if(callfunc("inarea",.@data[0],.@data[1],26,50,37,56))

{

unitwalk .@g,rand(30,37),.@data[1]+rand(3,5);

}

//

if(callfunc("inarea",.@data[0],.@data[1],62,43,73,49))

{

unitwalk .@g,rand(62,69),.@data[1]-rand(3,5);

}

//

if(callfunc("inarea",.@data[0],.@data[1],62,50,73,56))

{

unitwalk .@g,rand(62,69),.@data[1]+rand(3,5);

}

if(callfunc("inarea",.@data[0],.@data[1],43,62,49,73))

{

unitwalk .@g,.@data[0]-rand(3,5),rand(62,69);

}

if(callfunc("inarea",.@data[0],.@data[1],50,62,56,73))

{

unitwalk .@g,.@data[0]+rand(3,5),rand(62,69);

}

//

if(callfunc("inarea",.@data[0],.@data[1],50,26,56,37))

{

unitwalk .@g,.@data[0]+rand(3,5),rand(26,33);

}

//

if(callfunc("inarea",.@data[0],.@data[1],43,26,49,37))

{

unitwalk .@g,.@data[0]+rand(3,5),rand(30,37);

}

*/

}else

continue;

}

}

initnpctimer;

end;

}

 

 

 
I would ride position , 50.75 to 50.23
Edited by badarosko1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...