Jump to content

Question

Posted (edited)

Hello when entering a map I would like the summon monster dies

I do not get error in console when entering the map with summon

-    script    Sample    -1,{

OnInit:
set .Map$,"prt_fild01";
setmapflag .Map$,mf_loadevent;
end;

OnPCLoadMapEvent:
if(mobcount( .Map$,"Summon::On"+strcharinfo(3)+"") == 1 ) && (getcharid(0)){
    killmonster.Map$,"Summon::On"+strcharinfo(3)+"";
    end;
    } else {
    end;
    }
}

 

Edited by Giant Whisper

12 answers to this question

Recommended Posts

  • 0
Posted

oh sorry , i miss-read the topic

i see there is a messing Bracket in the script , also there is no need to check for the charid as it's not 0 for sure, but you better check for the map name (before the monster count)

also are you sure about the event name ?

so in your script case the npc name is "Summon" and the event is "Onprt_fild01" == Summon::Onprt_fild01

-	script	Sample	-1,{
OnInit:
	set .Map$,"prt_fild01";
	setmapflag .Map$,mf_loadevent;
end;
OnPCLoadMapEvent:
	if(strcharinfo(3) == .Map$ && mobcount( .Map$,"Summon::On"+strcharinfo(3)) == 1 ){
		killmonster.Map$,"Summon::On"+strcharinfo(3);
	}
end;
}

 

  • 0
Posted

when you @summon = no event label = mobcount command with a label wont work

you should make sure that the monster have a label for the script to work

  • 0
Posted

are items that make a summon monster appear

but I would like that the summon mob does not enter into some map?

that is the item script

62068,Sporing,SPoring,1,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ progressbar "0x00FF00",1; if(mobcount(strcharinfo(3),"Summon::On"+getcharid(0))) { killmonster strcharinfo(3),"Summon::On"+getcharid(0); } else { summon "Slave Poring",26127,100*60000,"Summon::On"+getcharid(0); } },{},{}

 

  • 0
Posted

try this

62068,Sporing,SPoring,1,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ progressbar "0x00FF00",1; if(mobcount(strcharinfo(3),"Summon_NPC::OnSummon")) { killmonster strcharinfo(3),"Summon_NPC::OnSummon"; } else { summon "Slave Poring",26127,100*60000,"Summon_NPC::OnSummon"; } },{},{} 


-	script	Summon_NPC	-1,{
OnInit:
	set .Map$,"prt_fild01";
	setmapflag .Map$,mf_loadevent;
end;
OnPCLoadMapEvent:
	if(strcharinfo(3) == .Map$ && mobcount( .Map$,"Summon_NPC::OnSummon") == 1 ){
		killmonster.Map$,"Summon_NPC::OnSummon";
	}
end;

OnSummon:
end;
}

 

  • 0
Posted (edited)
17 minutes ago, Giant Whisper said:

the summon still does not die when entering the map

any error/warning in the console ?

Edited by sader1992

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...