Jump to content
  • 0

How to add custom @cmd for information?


Question

Posted

Hi,

Player got exp from success like example, mining success.. Each success, player will get 1 exp.

 

But I want to make player can check how many mining exp by using @mining. I tried the scripts below but when I use that @mining, nothing happened.. And check at map.exe got npc_event : event not found.. Which do I miss? Or how to make this works? Thank you..

OnPCLoginEvent:
	set @MineExpTotal,@MineExp;
        end;
	
OnCmdMining:
	dispbottom strcharinfo(0),"your mining EXP is "+(MineExp)+".";
	end;
	
OnInit:
        bindatcmd "mining","Milenia Mining Corp::OnCmdMining";
        end;

4 answers to this question

Recommended Posts

  • 0
Posted

 

Hi,

Player got exp from success like example, mining success.. Each success, player will get 1 exp.

 

But I want to make player can check how many mining exp by using @mining. I tried the scripts below but when I use that @mining, nothing happened.. And check at map.exe got npc_event : event not found.. Which do I miss? Or how to make this works? Thank you..

OnPCLoginEvent:
	set @MineExpTotal,@MineExp;
        end;
	
OnCmdMining:
	dispbottom strcharinfo(0),"your mining EXP is "+(MineExp)+".";
	end;
	
OnInit:
        bindatcmd "mining","Milenia Mining Corp::OnCmdMining";
        end;

 

try to repalce

bindatcmd "mining","Milenia Mining Corp::OnCmdMining";

to

bindatcmd strnpcinfo(3) +"::OnCmdMining", 0, 99;

where 0, 99 = means all palyers can use this command.

  • 0
Posted (edited)

Not working.. I get : 

Unexpected type for argument 2. Expected string. and cant event using @mining command.. 

But when using script i post before, I can use @mining command.. But the server side shows [Error] npc_event : npc_event not found [mining::OnCmdMining]

Already change the name pc name to mining only.. Also not found.. Maybe i make mistake with this OnPCLoginEvent? 
 

OnPCLoginEvent:
	set @MineExpTotal,@MineExp;
        end;

EDIT :

Just figure it out.. I put the script at wrong section.. So it not load the NPC name but load that other NPC name.. Which is the cause it not functioning.. Thank you guys..

Edited by rakuzas

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