Jump to content
  • 0

error adding custom command for specific group


Question

6 answers to this question

Recommended Posts

  • 0
Posted

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.

 

  • 1
Posted
-	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
  • 0
Posted
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

  • 0
Posted
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

 

  • 0
Posted (edited)
-    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

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