Jump to content
  • 0

@randomdisguise


mrlongshen

Question


  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   77
  • Joined:  12/04/12
  • Last Seen:  

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.

Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

This emu throw an error with disguise command, but the command is in the source. It may be an issue with Hercules.

Link to comment
Share on other sites

  • 1

  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  151
  • Topics Per Day:  0.04
  • Content Count:  393
  • Reputation:   3
  • Joined:  09/16/13
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   77
  • Joined:  12/04/12
  • Last Seen:  

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.
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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 ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   77
  • Joined:  12/04/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   77
  • Joined:  12/04/12
  • Last Seen:  

This emu throw an error with disguise command, but the command is in the source. It may be an issue with Hercules.

 

ok thx you sir.

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

otherwise try

disguise .@mobid;

->

atcommand "@disguise "+ .@mobid;
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...