Jump to content
  • 0

Help me for fix NPC please ..


Question

Posted (edited)

I have one problem when I studied the script npc


    if( countitem(7420) < 1 ) {
        announce ""+strcharinfo(0)+" : "+@mensagem$+" ",bc_blue;
    } else if( countitem(7420) > 20 ){
        announce "[ Legend ] "+strcharinfo(0)+" : "+@mensagem$+" ",bc,0xD20000;
        close;
    }
    else if( countitem(7420) > 50){
        announce "[ Dewa ] "+strcharinfo(O)+" : "+@mensagem$+" ",0,0x000000;
        close;
    }
    else if( countitem(7420) > 100){
        announce "[ Jendral ] "+strcharinfo(0)+" : "+@mensagem$+" ",0x33FF33;
        close;

    }
        
        
    

i want to make :

1. if the player has a 7420 item 20 then broadcast the red
2. if the player has a similar item but has more than 20 then the broadcast is blue
and etc

 

there anything you can solve my problem ? sory bad english ...


bump


bump

Edited by anakawai

2 answers to this question

Recommended Posts

  • 0
Posted


if ( countitem(7420) >= 50 ) {

announce "[ Legend ] "+strcharinfo(0)+" : "+@mensagem$+" ",bc_all,0x0055FF; // blue

}

else if ( countitem(7420) >= 20 ) {

announce "[ Legend ] "+strcharinfo(0)+" : "+@mensagem$+" ",bc_all,0xFF0000; // red

}

  • 0
Posted
if ( countitem(7420) >= 50 ) {
	announce "[ Legend ] "+strcharinfo(0)+" : "+@mensagem$+" ",bc_all,0x0055FF; // blue
}
else if ( countitem(7420) >= 20 ) {
	announce "[ Legend ] "+strcharinfo(0)+" : "+@mensagem$+" ",bc_all,0xFF0000; // red
}

 

big thanks emistry this work . gbu

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