fiction
New member
Hi,
I need some help to make a mob change the appareance every 25 sec, and store the previous HP and position.
Is similar to Facewrom,
This is that i have currently, but have error when i try to spawn the mob in the previous position.
1@def01,50,50,4 script asdasd 4_NFWISP,{
donpcevent("fff#Start::OnStart");
}
1@def01,0,0,0 script fff#Start HIDDEN_NPC,{
OnStart:
.@GID = monster ("1@def01", 50, 55, _("--ja--"), 3500, 1, "DarkThanatos::OnDead");
initnpctimer "fff#Start";
initnpctimer;
end;
OnTimer6000:
killmonsterall "1@def01";
.@max_hp = getmonsterinfo( 3500,UDT_MAXHP );
.@hp = getmonsterinfo( 3500,UDT_HP );
.@element = rand( 3501,3504 );
// TODO: required mob controller script commands or other alternatives workaround.
getmapxy(@mapname$, @mapx, @mapx, UNITTYPE_MOB);
.@GID = monster( @mapname$,@mapx,@mapx,"--ja--",.@element,1,"DarkThanatos::OnDead" );
setunitdata( .@GID,UDT_HP,.@hp );
setunitdata( .@GID,UDT_MAXHP,.@max_hp );
initnpctimer;
switch ( .@element ) {
case 3501:
mapannounce "1@def01","MOB changed to Fire element!",bc_map;
break;
case 3502:
mapannounce "1@def01","MOB changed to Earth element!",bc_map;
break;
case 3503:
mapannounce "1@def01","MOB changed to Water element!",bc_map;
break;
case 3504:
mapannounce "1@def01","MOB changed to Wind element!",bc_map;
break;
}
end;
OnMyMobDead:
end;
OnDead:
end;
}
Greetings.-
I need some help to make a mob change the appareance every 25 sec, and store the previous HP and position.
Is similar to Facewrom,
This is that i have currently, but have error when i try to spawn the mob in the previous position.
1@def01,50,50,4 script asdasd 4_NFWISP,{
donpcevent("fff#Start::OnStart");
}
1@def01,0,0,0 script fff#Start HIDDEN_NPC,{
OnStart:
.@GID = monster ("1@def01", 50, 55, _("--ja--"), 3500, 1, "DarkThanatos::OnDead");
initnpctimer "fff#Start";
initnpctimer;
end;
OnTimer6000:
killmonsterall "1@def01";
.@max_hp = getmonsterinfo( 3500,UDT_MAXHP );
.@hp = getmonsterinfo( 3500,UDT_HP );
.@element = rand( 3501,3504 );
// TODO: required mob controller script commands or other alternatives workaround.
getmapxy(@mapname$, @mapx, @mapx, UNITTYPE_MOB);
.@GID = monster( @mapname$,@mapx,@mapx,"--ja--",.@element,1,"DarkThanatos::OnDead" );
setunitdata( .@GID,UDT_HP,.@hp );
setunitdata( .@GID,UDT_MAXHP,.@max_hp );
initnpctimer;
switch ( .@element ) {
case 3501:
mapannounce "1@def01","MOB changed to Fire element!",bc_map;
break;
case 3502:
mapannounce "1@def01","MOB changed to Earth element!",bc_map;
break;
case 3503:
mapannounce "1@def01","MOB changed to Water element!",bc_map;
break;
case 3504:
mapannounce "1@def01","MOB changed to Wind element!",bc_map;
break;
}
end;
OnMyMobDead:
end;
OnDead:
end;
}
Code:
[Error]: script_rid2sd: fatal error ! player not attached!
[Debug]: Function: monster (7 parameters):
[Debug]: Data: variable name='@mapname$' index=0
[Debug]: Data: variable name='@mapx' index=0
[Debug]: Data: variable name='@mapx' index=0
[Debug]: Data: string value="--ja--"
[Debug]: Data: variable name='.@element' index=0
[Debug]: Data: number value=1
[Debug]: Data: string value="DarkThanatos::OnDead"
[Debug]: Source (NPC): DarkThanatos2#Start at 1@def01 (0,0)
[Warning]: script_get_val: cannot access player variable '@mapname$', defaulting to ""
[Error]: script_rid2sd: fatal error ! player not attached!
[Debug]: Function: monster (7 parameters):
[Debug]: Data: string value=""
[Debug]: Data: variable name='@mapx' index=0
[Debug]: Data: variable name='@mapx' index=0
[Debug]: Data: string value="--ja--"
[Debug]: Data: variable name='.@element' index=0
[Debug]: Data: number value=1
[Debug]: Data: string value="DarkThanatos::OnDead"
[Debug]: Source (NPC): DarkThanatos2#Start at 1@def01 (0,0)
[Warning]: script_get_val: cannot access player variable '@mapx', defaulting to 0
[Error]: script_rid2sd: fatal error ! player not attached!
[Debug]: Function: monster (7 parameters):
[Debug]: Data: string value=""
[Debug]: Data: number value=0
[Debug]: Data: variable name='@mapx' index=0
[Debug]: Data: string value="--ja--"
[Debug]: Data: variable name='.@element' index=0
[Debug]: Data: number value=1
[Debug]: Data: string value="DarkThanatos::OnDead"
[Debug]: Source (NPC): DarkThanatos2#Start at 1@def01 (0,0)
[Warning]: script_get_val: cannot access player variable '@mapx', defaulting to 0
[Debug]: mapindex_name2id: Map "" not found in index list!
[Warning]: buildin_monster: Attempted to spawn monster class 3502 on non-existing map ''
[Debug]: Source (NPC): DarkThanatos2#Start at 1@def01 (0,0)
Greetings.-
Last edited by a moderator: