Hello.
I'm trying to create a custom instance, but can not make a npc appear when the given time, and not to show a viewpoint on the mini map, the following error on map_server:
Script:
1@glast,1,1,0 script #snfescape CLEAR_NPC,{
end;
OnStart:
initnpctimer;
end;
OnTimer1500:
donpcevent instance_npcname("#snfBGM")+"::OnEscape";
.@map$ = instance_mapname("1@glast");
viewpoint 1,351,271,1,0x00FF00;
for(.@i = 1; .@i <= 5; .@i++) {
My other problem is this, I can not instantiate this npc:
1@glast,176,179,4 script Tesouro#snf1 4_TREASURE_BOX,{
.@map$ = instance_mapname("1@glast");
setarray .@gain,912,719,723,730,730,730,7228,7229,7229,6803,15121,8523;
setarray .@rate,900,800,800,500,300,200, 300, 500, 200, 100, 10, 10;
getmapxy(.@map$,.@x,.@y,1,instance_npcname(strnpcinfo(0)));
specialeffect 10;
hideonnpc instance_npcname(strnpcinfo(0));
for(.@i = 0; .@i<getarraysize(.@gain); .@i++) {
if(rand(1000) < .@rate[.@i])
makeitem .@gain[.@i],1,.@map$,.@x+rand(3)-1,.@y+rand(3)-1;
}
end;
OnInstanceInit:
disablenpc instance_npcname(strnpcinfo(0));
end;
}
1@glast,62,279,0 duplicate(Tesouro#snf1) Tesouro#snf2 4_TREASURE_BOX
1@glast,200,135,4 duplicate(Tesouro#snf1) Tesouro#snf3 4_TREASURE_BOX
1@glast,97,38,4 duplicate(Tesouro#snf1) Tesouro#snf4 4_TREASURE_BOX
1@glast,267,351,0 duplicate(Tesouro#snf1) Tesouro#snf5 4_TREASURE_BOX
In the same npc top that has the viewpoint, it should enable the treasures, but they do not activate:
1@glast,1,1,0 script #snfescape CLEAR_NPC,{
end;
OnStart:
initnpctimer;
end;
OnTimer1500:
donpcevent instance_npcname("#snfBGM")+"::OnEscape";
.@map$ = instance_mapname("1@glast");
viewpoint 1,351,271,1,0x00FF00;
for(.@i = 1; .@i <= 5; .@i++) {
enablenpc instance_npcname("Tesouro#snf"+.@i);
Can someone help me?