Jump to content
  • 0

How can I make a tag on a player?


eKoh

Question


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  206
  • Reputation:   13
  • Joined:  01/07/12
  • Last Seen:  

Hello, I am introducing myself to this scripting world, it is amazing haha, but what is hard to me is to find the correct instruction for somethings I want to do.

 

I've just made a npc script, which gives you newbie supplies and some other stuff:

 

poring_gnd,79,88,5    script    Get Started::start    117,{
    mes "[^001D9CGet Started^000000]";    
    mes "Hello!";
    mes "I am the one who will guide you into this amazing world!";
    next;
        mes "What would you like to do?";
            menu "I want to train!",train,"Get me to Prontera!",prontera,"Nothing.",nothing;
                train:
                    mes "That's Great!";
                    mes "I am giving you these equipments so you can start your adventure!";
                    getitem 1243,1;
                    getitem 569,100;
                    close;
                prontera:
                    savepoint prontera,156,179;
                    warp "prontera",156,70;
                    close;
                nothing:
                    mes "Have a good trip!";
                    close;
                    /*
                    *is it working?*/
}

 

But what I want to do is to tag a player after he/she gets the items from the npc, so when he tries again to get these items, this tag will say to the npc to not give the items.

 

I am following this kind of guide but it's hard to see which instruction I need to use.

Edited by eKoh
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

 

Prefix: scope and extent
nothing - A permanent variable attached to the character, the default variable
           type. They are stored in the `global_reg_value` table using type 3.
"#"      - A permanent local account variable.

 

a sample, you attached the var to the character

train:
	if ( attach_variable > 0 ) {
		mes "you already get the items";
		close;
	}
	mes "That's Great!";
	mes "I am giving you these equipments so you can start your adventure!";
	getitem 1243,1;
	getitem 569,100;
	attach_variable = 1;
	close;

to attach the var to the account, use the prefix # (attach_variable become #attach_variable in our sample)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  206
  • Reputation:   13
  • Joined:  01/07/12
  • Last Seen:  

@Capuche

 

Thank you a lot, I was having some troubles with the script:

 

                train:
                if ( newdone > 0 ) {
                    mes "Keep the good work!";
                    close;
                    }
                    mes "That's Great!";
                    mes "I am giving you these equipments so you can start your adventure!";
                    getitem 1243,1;
                    getitem 569,100;
                    newdone = 1;
                    close;

 

Error:

2m6phqo.jpg

 

I had to do this (I don't know if it is the best way to make it work).

 

                if ( newdone > 0 ) {
                    mes "Keep the good work!";
                    close;
                    }
                    mes "That's Great!";
                    mes "I am giving you these equipments so you can start your adventure!";
                    getitem 1243,1;
                    getitem 569,100;
                    set newdone, 1;
                    close;

 

The last one is working perfectly.

Edited by eKoh
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...