Jump to content
  • 0

Having a problem with my script


Noire

Question


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  103
  • Reputation:   1
  • Joined:  06/26/13
  • Last Seen:  



When i try to kill player inside those error pop up whats wrong with this script ? >.<

1212121121.png

asdadasdasdas.png

Edited by Noire
Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  351
  • Reputation:   263
  • Joined:  09/08/13
  • Last Seen:  

  • 0

  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  103
  • Reputation:   1
  • Joined:  06/26/13
  • Last Seen:  

solved thanks ❤️

 

uhmmm,, can i ask for help again ! when i tried to kill a monster im having an error like this >.<

sk2.png

sk1.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

Im not sure about this, because i only see a screenshot and cannot see the script well.. try putting it like this

OnMVPDeath:
		end;
OnInit:

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  103
  • Reputation:   1
  • Joined:  06/26/13
  • Last Seen:  

123.thumb.png.d754acd413afe9d2d1d4e939f1f34f7e.pnghere sorry >>.<<

Edited by Noire
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

What's the result of the changes?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  103
  • Reputation:   1
  • Joined:  06/26/13
  • Last Seen:  

still same T_T after kill the monster

123456.png

Edited by Noire
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Please share the whole script 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  103
  • Reputation:   1
  • Joined:  06/26/13
  • Last Seen:  


here sorry for not uploading

Edited by Noire
codebox
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  17
  • Reputation:   5
  • Joined:  01/06/12
  • Last Seen:  

I didnt look how the npc works, only fixed the error...

Could you try this please?

Spoiler

 prontera,119,168,6 script  Skormy  641,{
    if(getgmlevel()<.gmlevel) end;
    set .@MVPID,-3;
    
L_Menu:
    mes .NPC$;
    mes "Select an option from the menu below and click [ ^0000FFSummon!^000000 ] when you're done.";
    next;
    
    if(.@MVPID == -3){
        set .@tmp$,"Random MVP";
    } else if ( .@MVPID ) {
        set .@tmp$,getmonsterinfo(.@MVPID,0);
    } else {
        set .@tmp$,"NULL";
    }

    Switch(select("Monster ID ( ^0000FF"+.@tmp$+"^000000 ) :Map Name ( ^0000FF"+.@MAPNAME$+"^000000 ) :Amount ( ^0000FF"+.@AMOUNT+"^000000 ):[ ^0000FFSummon!^000000 ]")) {
        case 1:
            mes .NPC$;
            mes "Input the id of the monster you'd like to spawn.";
            next;
            input(.@MVPID);
            while(!query_sql("(SELECT `ID` from `mob_db` where `ID` = "+.@MVPID+") UNION ALL (SELECT `ID` from `mob_db2` where `ID` = "+.@MVPID+" LIMIT 1);",.@a))
                input(.@MVPID);
                
            if( compare(.blacklist$,"|"+.@MVPID+"|" ) ) {
                message strcharinfo(0),"I'm sorry but that monster was blacklisted!";
                message strcharinfo(0),"Please use a different id.";
                set(.@MVPID,0);
            }
            
            goto L_Menu;
            
        case 2:
            mes .NPC$;
            mes "Input the name of the map you'd like to spawn the monster on.";
            next;
            input(.@MAPNAME$);
            while(mobcount(.@MAPNAME$,"all")==-1){
                input(.@MAPNAME$);
                if(mobcount(.@MAPNAME$,"all")!=-1){
                    mes "Would you like to spawn "+(.@MVPID==-3?"Random MVPs":getmonsterinfo(.@MVPID,0))+" on the map "+.@MAPNAME$+"?";
                    next;
                    if(select("Yes:No")-1) { set .@MAPNAME$,""; continue; } else { break; }
                }
            }
            goto L_Menu;
            
        case 3:
            mes .NPC$;
            mes "Input the amount you'd like to spawn.";
            mes "( Maximum "+.Lamount+" )";
            next;
            input(.@AMOUNT);
            while(.@AMOUNT<=0||.@AMOUNT>.Lamount) {
                input(.@AMOUNT);
                if(.@AMOUNT>0&&.@AMOUNT<=.Lamount) {
                    mes "Would you like to spawn "+.@AMOUNT+" monsters?";
                    next;
                    if(select("Yes:No")-1) { set .@AMOUNT,0; continue; } else { break; }
                }
            }
            goto L_Menu;
            
        case 4:
            if( mobcount(.@MAPNAME$,"all")==-1 || .@AMOUNT<=0 ) {
                if(!.fiesta) {
                    mes .NPC$;
                    mes "I'm sorry you need to fill-out all the fields before summoning a monster!";
                    next;
                    goto L_Menu;
                } else {
                    if(mobcount(.@MAPNAME$,"all")==-1) set .@MAPNAME$,"this";
                    if(.@AMOUNT<=0) set .@AMOUNT,.fiesta;
                }
            }
            
            if(.Mamount){
                if(mobcount(.@MAPNAME$,"Skormy::OnMVPDeath")+.@AMOUNT>.Mamount&&.Mamount>0) {
                    mes .NPC$;
                    mes "I'm sorry but there can only be "+.Mamount+" MVPs in one map.";
                    set .@tmp,.Mamount-mobcount(.@MAPNAME$,"Skormy::OnMVPDeath");
                    if(.@tmp>0) {
                        mes "Would you like to spawn "+.@tmp+" instead?";
                        if(select("Yes:No")-1) { mes "Ok!"; close; }
                        announce ""+strcharinfo(0)+" : Summoned "+.@AMOUNT+" "+.@tmp$+"(s) in "+(.@MAPNAME$=="this"?strcharinfo(3):.@MAPNAME$)+".",bc_all,"0x"+.fontcolor$;
                        monster .@MAPNAME$,0,0,"--ja--",.@MVPID,.@tmp,"Skormy::OnMVPDeath";
                        close;
                    }
                    next;
                    goto L_Menu;
                }
            }
        
            announce ""+strcharinfo(0)+" : Summoned "+.@AMOUNT+" "+.@tmp$+"(s) in "+(.@MAPNAME$=="this"?strcharinfo(3):.@MAPNAME$)+".",bc_all,"0x"+.fontcolor$;
            monster .@MAPNAME$,0,0,"--ja--",.@MVPID,.@AMOUNT,"Skormy::OnMVPDeath";
            close;
    }
    end;
    
OnMVPDeath:
    end;
            
OnInit:
    //=-=-=-=-=-=Configuration=-=-=-=-=-=
    set .NPC$,"[ ^D2691ESkormy^000000 ]"; // Npc Name
    set .gmlevel,60; //Minimum Gm level allowed to spawn MVPS.
    set .fiesta,0; // If enabled will spawn that many random MVPs on the players map if no other information is provided! (Off=0) Will bypass Maximum amount!
    set .fontcolor$,"FFFF00"; // Hexi color text is announced in.
    set .Lamount,20; // Maximum amount of mvps that can be spawned at once.
    set .Mamount,100; // Maximum amount of mvps on one map at a time. (Off=0)
    set .blacklist$,"|1288|1003|1004|1005|";
    //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
}

 

Edited by luanwg
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  103
  • Reputation:   1
  • Joined:  06/26/13
  • Last Seen:  

31 minutes ago, -Chuck- said:

I didnt look how the npc works, only fixed the error...

Could you try this please?

  Reveal hidden contents

 prontera,119,168,6 script  Skormy  641,{
    if(getgmlevel()<.gmlevel) end;
    set .@MVPID,-3;
    
L_Menu:
    mes .NPC$;
    mes "Select an option from the menu below and click [ ^0000FFSummon!^000000 ] when you're done.";
    next;
    
    if(.@MVPID == -3){
        set .@tmp$,"Random MVP";
    } else if ( .@MVPID ) {
        set .@tmp$,getmonsterinfo(.@MVPID,0);
    } else {
        set .@tmp$,"NULL";
    }

    Switch(select("Monster ID ( ^0000FF"+.@tmp$+"^000000 ) :Map Name ( ^0000FF"+.@MAPNAME$+"^000000 ) :Amount ( ^0000FF"+.@AMOUNT+"^000000 ):[ ^0000FFSummon!^000000 ]")) {
        case 1:
            mes .NPC$;
            mes "Input the id of the monster you'd like to spawn.";
            next;
            input(.@MVPID);
            while(!query_sql("(SELECT `ID` from `mob_db` where `ID` = "+.@MVPID+") UNION ALL (SELECT `ID` from `mob_db2` where `ID` = "+.@MVPID+" LIMIT 1);",.@a))
                input(.@MVPID);
                
            if( compare(.blacklist$,"|"+.@MVPID+"|" ) ) {
                message strcharinfo(0),"I'm sorry but that monster was blacklisted!";
                message strcharinfo(0),"Please use a different id.";
                set(.@MVPID,0);
            }
            
            goto L_Menu;
            
        case 2:
            mes .NPC$;
            mes "Input the name of the map you'd like to spawn the monster on.";
            next;
            input(.@MAPNAME$);
            while(mobcount(.@MAPNAME$,"all")==-1){
                input(.@MAPNAME$);
                if(mobcount(.@MAPNAME$,"all")!=-1){
                    mes "Would you like to spawn "+(.@MVPID==-3?"Random MVPs":getmonsterinfo(.@MVPID,0))+" on the map "+.@MAPNAME$+"?";
                    next;
                    if(select("Yes:No")-1) { set .@MAPNAME$,""; continue; } else { break; }
                }
            }
            goto L_Menu;
            
        case 3:
            mes .NPC$;
            mes "Input the amount you'd like to spawn.";
            mes "( Maximum "+.Lamount+" )";
            next;
            input(.@AMOUNT);
            while(.@AMOUNT<=0||.@AMOUNT>.Lamount) {
                input(.@AMOUNT);
                if(.@AMOUNT>0&&.@AMOUNT<=.Lamount) {
                    mes "Would you like to spawn "+.@AMOUNT+" monsters?";
                    next;
                    if(select("Yes:No")-1) { set .@AMOUNT,0; continue; } else { break; }
                }
            }
            goto L_Menu;
            
        case 4:
            if( mobcount(.@MAPNAME$,"all")==-1 || .@AMOUNT<=0 ) {
                if(!.fiesta) {
                    mes .NPC$;
                    mes "I'm sorry you need to fill-out all the fields before summoning a monster!";
                    next;
                    goto L_Menu;
                } else {
                    if(mobcount(.@MAPNAME$,"all")==-1) set .@MAPNAME$,"this";
                    if(.@AMOUNT<=0) set .@AMOUNT,.fiesta;
                }
            }
            
            if(.Mamount){
                if(mobcount(.@MAPNAME$,"Skormy::OnMVPDeath")+.@AMOUNT>.Mamount&&.Mamount>0) {
                    mes .NPC$;
                    mes "I'm sorry but there can only be "+.Mamount+" MVPs in one map.";
                    set .@tmp,.Mamount-mobcount(.@MAPNAME$,"Skormy::OnMVPDeath");
                    if(.@tmp>0) {
                        mes "Would you like to spawn "+.@tmp+" instead?";
                        if(select("Yes:No")-1) { mes "Ok!"; close; }
                        announce ""+strcharinfo(0)+" : Summoned "+.@AMOUNT+" "+.@tmp$+"(s) in "+(.@MAPNAME$=="this"?strcharinfo(3):.@MAPNAME$)+".",bc_all,"0x"+.fontcolor$;
                        monster .@MAPNAME$,0,0,"--ja--",.@MVPID,.@tmp,"Skormy::OnMVPDeath";
                        close;
                    }
                    next;
                    goto L_Menu;
                }
            }
        
            announce ""+strcharinfo(0)+" : Summoned "+.@AMOUNT+" "+.@tmp$+"(s) in "+(.@MAPNAME$=="this"?strcharinfo(3):.@MAPNAME$)+".",bc_all,"0x"+.fontcolor$;
            monster .@MAPNAME$,0,0,"--ja--",.@MVPID,.@AMOUNT,"Skormy::OnMVPDeath";
            close;
    }
    end;
    
OnMVPDeath:
    end;
            
OnInit:
    //=-=-=-=-=-=Configuration=-=-=-=-=-=
    set .NPC$,"[ ^D2691ESkormy^000000 ]"; // Npc Name
    set .gmlevel,60; //Minimum Gm level allowed to spawn MVPS.
    set .fiesta,0; // If enabled will spawn that many random MVPs on the players map if no other information is provided! (Off=0) Will bypass Maximum amount!
    set .fontcolor$,"FFFF00"; // Hexi color text is announced in.
    set .Lamount,20; // Maximum amount of mvps that can be spawned at once.
    set .Mamount,100; // Maximum amount of mvps on one map at a time. (Off=0)
    set .blacklist$,"|1288|1003|1004|1005|";
    //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
}

 

image.png.1a4b35c5585664877d9aeb429c74363d.png

still having an error, this npc works like summoning an MVP mobs or Normal mobs.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  17
  • Reputation:   5
  • Joined:  01/06/12
  • Last Seen:  

Ive just tried it here and got no errors.. I will paste into code..

Was reading this code, is called OnMVPDeath, but there is nothing on this event.. just a end;

 prontera,119,168,6	script	Skormy	641,{
	if(getgmlevel()<.gmlevel) end;
	set .@MVPID,-3;
	
L_Menu:
	mes .NPC$;
	mes "Select an option from the menu below and click [ ^0000FFSummon!^000000 ] when you're done.";
	next;
	
	if(.@MVPID == -3){
		set .@tmp$,"Random MVP";
	} else if ( .@MVPID ) {
		set .@tmp$,getmonsterinfo(.@MVPID,0);
	} else {
		set .@tmp$,"NULL";
	}

	Switch(select("Monster ID ( ^0000FF"+.@tmp$+"^000000 ) :Map Name ( ^0000FF"+.@MAPNAME$+"^000000 ) :Amount ( ^0000FF"+.@AMOUNT+"^000000 ):[ ^0000FFSummon!^000000 ]")) {
		case 1:
			mes .NPC$;
			mes "Input the id of the monster you'd like to spawn.";
			next;
			input(.@MVPID);
			while(!query_sql("(SELECT `ID` from `mob_db` where `ID` = "+.@MVPID+") UNION ALL (SELECT `ID` from `mob_db2` where `ID` = "+.@MVPID+" LIMIT 1);",.@a))
				input(.@MVPID);
				
			if( compare(.blacklist$,"|"+.@MVPID+"|" ) ) {
				message strcharinfo(0),"I'm sorry but that monster was blacklisted!";
				message strcharinfo(0),"Please use a different id.";
				set(.@MVPID,0);
			}
			
			goto L_Menu;
			
		case 2:
			mes .NPC$;
			mes "Input the name of the map you'd like to spawn the monster on.";
			next;
			input(.@MAPNAME$);
			while(mobcount(.@MAPNAME$,"all")==-1){
				input(.@MAPNAME$);
				if(mobcount(.@MAPNAME$,"all")!=-1){
					mes "Would you like to spawn "+(.@MVPID==-3?"Random MVPs":getmonsterinfo(.@MVPID,0))+" on the map "+.@MAPNAME$+"?";
					next;
					if(select("Yes:No")-1) { set .@MAPNAME$,""; continue; } else { break; }
				}
			}
			goto L_Menu;
			
		case 3:
			mes .NPC$;
			mes "Input the amount you'd like to spawn.";
			mes "( Maximum "+.Lamount+" )";
			next;
			input(.@AMOUNT);
			while(.@AMOUNT<=0||.@AMOUNT>.Lamount) {
				input(.@AMOUNT);
				if(.@AMOUNT>0&&.@AMOUNT<=.Lamount) {
					mes "Would you like to spawn "+.@AMOUNT+" monsters?";
					next;
					if(select("Yes:No")-1) { set .@AMOUNT,0; continue; } else { break; }
				}
			}
			goto L_Menu;
			
		case 4:
			if( mobcount(.@MAPNAME$,"all")==-1 || .@AMOUNT<=0 ) {
				if(!.fiesta) {
					mes .NPC$;
					mes "I'm sorry you need to fill-out all the fields before summoning a monster!";
					next;
					goto L_Menu;
				} else {
					if(mobcount(.@MAPNAME$,"all")==-1) set .@MAPNAME$,"this";
					if(.@AMOUNT<=0) set .@AMOUNT,.fiesta;
				}
			}
			
			if(.Mamount){
				if(mobcount(.@MAPNAME$,"Skormy::OnMVPDeath")+.@AMOUNT>.Mamount&&.Mamount>0) {
					mes .NPC$;
					mes "I'm sorry but there can only be "+.Mamount+" MVPs in one map.";
					set .@tmp,.Mamount-mobcount(.@MAPNAME$,"Skormy::OnMVPDeath");
					if(.@tmp>0) {
						mes "Would you like to spawn "+.@tmp+" instead?";
						if(select("Yes:No")-1) { mes "Ok!"; close; }
						announce ""+strcharinfo(0)+" : Summoned "+.@AMOUNT+" "+.@tmp$+"(s) in "+(.@MAPNAME$=="this"?strcharinfo(3):.@MAPNAME$)+".",bc_all,"0x"+.fontcolor$;
						monster .@MAPNAME$,0,0,"--ja--",.@MVPID,.@tmp,"Skormy::OnMVPDeath";
						close;
					}
					next;
					goto L_Menu;
				}
			}
		
			announce ""+strcharinfo(0)+" : Summoned "+.@AMOUNT+" "+.@tmp$+"(s) in "+(.@MAPNAME$=="this"?strcharinfo(3):.@MAPNAME$)+".",bc_all,"0x"+.fontcolor$;
			monster .@MAPNAME$,0,0,"--ja--",.@MVPID,.@AMOUNT,"Skormy::OnMVPDeath";
			close;
	}
	end;
	
OnMVPDeath:
	end;
			
OnInit:
	//=-=-=-=-=-=Configuration=-=-=-=-=-=
	set .NPC$,"[ ^D2691ESkormy^000000 ]"; // Npc Name
	set .gmlevel,60; //Minimum Gm level allowed to spawn MVPS.
	set .fiesta,0; // If enabled will spawn that many random MVPs on the players map if no other information is provided! (Off=0) Will bypass Maximum amount!
	set .fontcolor$,"FFFF00"; // Hexi color text is announced in.
	set .Lamount,20; // Maximum amount of mvps that can be spawned at once.
	set .Mamount,100; // Maximum amount of mvps on one map at a time. (Off=0)
	set .blacklist$,"|1288|1003|1004|1005|";
	//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

Tested it and to solve the issue replaced all 

MVP Spawner

into 

Skormy

that would solve the missing label.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  103
  • Reputation:   1
  • Joined:  06/26/13
  • Last Seen:  

solved sorry my bad didnt see the script properly thanks u guys!

2 hours ago, Radian said:

Tested it and to solve the issue replaced all 


MVP Spawner

into 


Skormy

that would solve the missing label.

can add announcement for killing an mvp boss? but the announcement is like this for example i summon random mvp bosses each id will be include. ( Player "name" killed amonra boss and so on. advance tanks for helping me out

Edited by Noire
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

2 hours ago, Noire said:

solved sorry my bad didnt see the script properly thanks u guys!

can add announcement for killing an mvp boss? but the announcement is like this for example i summon random mvp bosses each id will be include. ( Player "name" killed amonra boss and so on. advance tanks for helping me out

After a few test, I manage to make it work. here you go!

OnMVPDeath:
	@name$ = getmonsterinfo( killedrid, MOB_NAME);
	announce strcharinfo(0) + " has killed the monster " + @name$ + " !! ",bc_all;
    	end;

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  103
  • Reputation:   1
  • Joined:  06/26/13
  • Last Seen:  

22 minutes ago, Radian said:

After a few test, I manage to make it work. here you go!


OnMVPDeath:
	@name$ = getmonsterinfo( killedrid, MOB_NAME);
	announce strcharinfo(0) + " has killed the monster " + @name$ + " !! ",bc_all;
    	end;

 

all done thanks you guys !! ive learned alot sorry for asking too much!!

Link to comment
Share on other sites

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.

×
×
  • Create New...