Jump to content
  • 0

Question

Posted

I want to request a script for random disguise of monster in mob db. Its
for disguise event that handle for gm. The gm will use @randomdisguise than its will automatic select a random mobs. The monster name will Appear on the chat box of gm only. So we can see player guess correct or not.

8 answers to this question

Recommended Posts

  • 1
Posted

or like this ?

-	script	panpanlelapin	-1,{
OnInit:
	bindatcmd "randomdisguise",strnpcinfo(3)+"::OnAtcommand",60,60;// your min gmlevel
	.min_mobid = 1002;
	.max_mobid = 2000;
	.blacklist$ = "|1200|1201|1203|";// you don't want these mobs
	end;
OnAtcommand:
	do
		.@mobid = rand( .min_mobid,.max_mobid );
	while( compare( .blacklist$, ("|"+ .@mobid +"|") ) || getmonsterinfo( .@mobid,MOB_LV ) == -1 );
	disguise .@mobid;
	end;
}
  • Upvote 1
Posted (edited)

like this?

callfunc "disguiser"; },{},{}

function    script    disguiser    {
 
if(disguiser == 0){
switch( rand(18) ) {
case 0: atcommand "@disguise 1511"; break;
case 1: atcommand "@disguise 1898"; break;
case 2: atcommand "@disguise 1806"; break;
case 3: atcommand "@disguise 2017"; break;
case 4: atcommand "@disguise 2310"; break;
case 5: atcommand "@disguise 1388"; break;
case 6: atcommand "@disguise 1089"; break;
case 7: atcommand "@disguise 1200"; break;
case 8: atcommand "@disguise 1839"; break;
case 9: atcommand "@disguise 1154"; break;
case 10: atcommand "@disguise 1408"; break;
case 11: atcommand "@disguise 1785"; break;
case 12: atcommand "@disguise 1092"; break;
case 13: atcommand "@disguise 1989"; break;
case 14: atcommand "@disguise 1987"; break;
case 15: atcommand "@disguise 2018"; break;
case 16: atcommand "@disguise 1700"; break;
case 17: atcommand "@disguise 1933"; break;
    }
    set disguiser, 1;
        end;
    }
    if(disguiser == 1){
    atcommand "@undisguise";
    set disguiser, 0;
    end;
    }
}
Edited by Blue Jem
Posted (edited)

like this?

callfunc "disguiser"; },{},{}

...

 

how to put this script ?

 

or like this ?

 

[Error]: script error in file 'npc/ro/randomdisguise.txt' line 12 column 2

    parse_line: expect command, missing function name or calling undeclared func

tion

     9:         do

    10:                 .@mobid = rand( .min_mobid,.max_mobid );

    11:         while( compare( .blacklist$, ("|"+ .@mobid +"|") ) || getmonster

info( .@mobid,MOB_LV ) == -1 );

*   12:         disguise .@mobid;

        ~~~~~~~~^

    13:         end;

    14: }

 

how sir ?

Edited by Capuche
Remove long quote.
Posted

how to put this script ?

??? you quote Blue Jem and my post. Very confusing...

 

Blue Jem use a function. She call the function with an item.

Mine is a npc script that create a custom @randomdisguise command.

 

I can't reproduce your mapserv error, what emulator are you using ?

Posted

how to put this script ?

??? you quote Blue Jem and my post. Very confusing...

 

Blue Jem use a function. She call the function with an item.

Mine is a npc script that create a custom @randomdisguise command.

 

I can't reproduce your mapserv error, what emulator are you using ?

 

sir, im try using your script. im using hercules..

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