Jump to content
  • 0

Help me for fix NPC please ..


anakawai

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  09/08/15
  • Last Seen:  

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

2 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  


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

}

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  09/08/15
  • Last Seen:  

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

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