Jump to content
  • 0

error adding custom command for specific group


IsabelaFernandez

Question


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

which part is wrong in this script?

https://pt.textbin.net/szxomsopjc

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  235
  • Reputation:   87
  • Joined:  06/30/18
  • Last Seen:  

You should check out the script documentation. There you can see that bindatcmd takes the minimum group level that is allowed to run the atcommand as the third parameter.

*bindatcmd "<command>","<NPC object name>::<event label>"{,<atcommand level>,<charcommand level>};

This command will bind a NPC event label to an atcommand. Upon execution of the
atcommand, the user will invoke the NPC event label. Each atcommand is only allowed
one binding. If you rebind, it will override the original binding.
Note: The default level for atcommand is 0 while the default level for charcommand is 100.

 

Link to comment
Share on other sites

  • 1

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  171
  • Reputation:   68
  • Joined:  10/25/20
  • Last Seen:  

-	script	buff_cmd	-1,{
	
OnInit:
	bindatcmd "buffs", strnpcinfo(0)+"::OnCommand";
	end;

OnCommand:
	if(getgroupid() <= 7) {
		message strcharinfo(0),"Falha, você não possui VIP.";
		end;
	}
	// This will bestow the effect of Level 10 Blessing.
	skilleffect 74,0; sc_start SC_MAGNIFICAT,360000,5;
	skilleffect 75,0; sc_start SC_GLORIA,360000,5;
	skilleffect 66,0; sc_start SC_IMPOSITIO,360000,5;
	skilleffect 67,0; sc_start SC_SUFFRAGIUM,360000,3;
	skilleffect 34,0; sc_start SC_BLESSING,360000,10;
	skilleffect 29,0; sc_start SC_INCREASEAGI,360000,10;
	skilleffect 357,0; sc_start SC_CONCENTRATION,360000,5;
	skilleffect 155,0; sc_start SC_LOUD,360000,1;
	sc_start SC_ASPDPOTION2,360000,0;
	sc_start SC_STRFood,360000,10;
	sc_start SC_AGIFood,360000,10;
	sc_start SC_VITFood,360000,10;
	sc_start SC_INTFood,360000,10;
	sc_start SC_DEXFood,360000,10;
	sc_start SC_LUKFood,360000,10;
	sc_start SC_HitFood,1200000,30;
	sc_start SC_FleeFood,1200000,30;
	sc_start SC_BATKFood,1200000,10;
	sc_start SC_MATKFood,120000,10;
}

 

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

2 hours ago, Winterfox said:

You should check out the script documentation. There you can see that bindatcmd takes the minimum group level that is allowed to run the atcommand as the third parameter.

*bindatcmd "<command>","<NPC object name>::<event label>"{,<atcommand level>,<charcommand level>};

This command will bind a NPC event label to an atcommand. Upon execution of the
atcommand, the user will invoke the NPC event label. Each atcommand is only allowed
one binding. If you rebind, it will override the original binding.
Note: The default level for atcommand is 0 while the default level for charcommand is 100.

 

Thanks, but I keep getting the script positioning wrong

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

14 hours ago, cook1e said:
-	script	buff_cmd	-1,{
	
OnInit:
	bindatcmd "buffs", strnpcinfo(0)+"::OnCommand";
	end;

OnCommand:
	if(getgroupid() <= 7) {
		message strcharinfo(0),"Falha, você não possui VIP.";
		end;
	}
	// This will bestow the effect of Level 10 Blessing.
	skilleffect 74,0; sc_start SC_MAGNIFICAT,360000,5;
	skilleffect 75,0; sc_start SC_GLORIA,360000,5;
	skilleffect 66,0; sc_start SC_IMPOSITIO,360000,5;
	skilleffect 67,0; sc_start SC_SUFFRAGIUM,360000,3;
	skilleffect 34,0; sc_start SC_BLESSING,360000,10;
	skilleffect 29,0; sc_start SC_INCREASEAGI,360000,10;
	skilleffect 357,0; sc_start SC_CONCENTRATION,360000,5;
	skilleffect 155,0; sc_start SC_LOUD,360000,1;
	sc_start SC_ASPDPOTION2,360000,0;
	sc_start SC_STRFood,360000,10;
	sc_start SC_AGIFood,360000,10;
	sc_start SC_VITFood,360000,10;
	sc_start SC_INTFood,360000,10;
	sc_start SC_DEXFood,360000,10;
	sc_start SC_LUKFood,360000,10;
	sc_start SC_HitFood,1200000,30;
	sc_start SC_FleeFood,1200000,30;
	sc_start SC_BATKFood,1200000,10;
	sc_start SC_MATKFood,120000,10;
}

 

Thank you my dear, it worked perfectly /thx

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

I can't connect nor can I get the specific group (in this case group 5) to accept my custom command called @buffs

error.png

erro2.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.01
  • Content Count:  19
  • Reputation:   4
  • Joined:  04/18/23
  • Last Seen:  

-    script    buff    -1,{
OnInit:
    bindatcmd "buff",strnpcinfo(3)+"::OnBuff";
    end;
    OnBuff:    if ( getgmlevel() >= 99 || getgroupid() >= 5 ){
    
// This will bestow the effect of Level 10 Blessing.
    skilleffect 74,0; sc_start SC_MAGNIFICAT,360000,5;
    skilleffect 75,0; sc_start SC_GLORIA,360000,5;
    skilleffect 66,0; sc_start SC_IMPOSITIO,360000,5;
    skilleffect 67,0; sc_start SC_SUFFRAGIUM,360000,3;
    skilleffect 34,0; sc_start SC_BLESSING,360000,10;
    skilleffect 29,0; sc_start SC_INCREASEAGI,360000,10;
    skilleffect 357,0; sc_start SC_CONCENTRATION,360000,5;
    skilleffect 155,0; sc_start SC_LOUD,360000,1;
    sc_start SC_ASPDPOTION2,360000,0;
    sc_start SC_STRFood,360000,10;
    sc_start SC_AGIFood,360000,10;
    sc_start SC_VITFood,360000,10;
    sc_start SC_INTFood,360000,10;
    sc_start SC_DEXFood,360000,10;
    sc_start SC_LUKFood,360000,10;
    sc_start SC_HitFood,1200000,30;
    sc_start SC_FleeFood,1200000,30;
    sc_start SC_BATKFood,1200000,10;
    sc_start SC_MATKFood,120000,10;

    end;
    }    else      {
    dispbottom "Falha, você não possui VIP.";
    end;
    }
    }
Edited by xJohn
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...