Jump to content
  • 0

Freebies npc with options!


Famous

Question


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.03
  • Content Count:  455
  • Reputation:   3
  • Joined:  06/19/12
  • Last Seen:  

prontera,160,187,4	script	Freebies	123,{
	mes "[Hello]";
	mes "[I can give you a free gift based on your future job.]";
	mes "[Please choose the correct item for the future job]";

	if(!#Freebie) {
		mes "Select one:";
		next;
		switch(select("Swordsman:Magician:Archer:Acolyte:Merchant:Thief")) {
			case 1:
				getitem 13758,1;
				getitem 969,20;
				getitem 1108,1;
				getitem 2104,1;
				getitem 4043,4; //Item for Swordsman
				break;

			case 2:
				getitem 13758,1;
				getitem 969,20;
				getitem 1108,1;
				getitem 2104,1;
				getitem 4043,4; //Item for Magician
				break;

			case 3:
				getitem 13758,1;
				getitem 969,20;
				getitem 1108,1;
				getitem 2104,1;
				getitem 4043,4; //Item for Archer
				break;
				
			case 4:
				getitem 13758,1;
				getitem 969,20;
				getitem 1108,1;
				getitem 2104,1;
				getitem 4043,4; //Item for Acolyte
				break;
			
			case 5:
				getitem 13758,1;
				getitem 969,20;
				getitem 1108,1;
				getitem 2104,1;
				getitem 4043,4; //Item for Merchant
				break;
			
			case 6:
				getitem 13758,1;
				getitem 969,20;
				getitem 1108,1;
				getitem 2104,1;
				getitem 4043,4; //Item for Thief
				break;
				
			}
			set #Freebie, 1;
			close;
	}
	OnInit:
	waitingroom "Get your freebies here ! ",0;
	end;
}

How to fix this script one time use only per account!

Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.05
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

prontera,160,187,4    script    Freebies    123,{
    mes "[Hello]";
    mes "[I can give you a free gift based on your future job.]";
    mes "[Please choose the correct item for the future job]";
    next;
    if(!#Freebie) {
        mes "Select one:";
        next;
        switch(select("Swordsman:Magician:Archer:Acolyte:Merchant:Thief")) {
            case 1:
                getitem 13758,1;
                getitem 969,20;
                getitem 1108,1;
                getitem 2104,1;
                getitem 4043,4; //Item for Swordsman
                break;
 
            case 2:
                getitem 13758,1;
                getitem 969,20;
                getitem 1108,1;
                getitem 2104,1;
                getitem 4043,4; //Item for Magician
                break;
 
            case 3:
                getitem 13758,1;
                getitem 969,20;
                getitem 1108,1;
                getitem 2104,1;
                getitem 4043,4; //Item for Archer
                break;
                
            case 4:
                getitem 13758,1;
                getitem 969,20;
                getitem 1108,1;
                getitem 2104,1;
                getitem 4043,4; //Item for Acolyte
                break;
            
            case 5:
                getitem 13758,1;
                getitem 969,20;
                getitem 1108,1;
                getitem 2104,1;
                getitem 4043,4; //Item for Merchant
                break;
            
            case 6:
                getitem 13758,1;
                getitem 969,20;
                getitem 1108,1;
                getitem 2104,1;
                getitem 4043,4; //Item for Thief
                break;
                
            }
            set #Freebie, 1;
            close;
    }
   mes "[ Trololol ]";
   mes "You already receive your freebies!";
   close;
 
    OnInit:
    waitingroom "Get your freebies here ! ",0;
    end;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.03
  • Content Count:  455
  • Reputation:   3
  • Joined:  06/19/12
  • Last Seen:  

bug on script upon select character and log in again I talk to npc then npc will me me another freebies



how to changed it removed npc and upon log in it will just pump out once and the player can just easily select

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  177
  • Reputation:   10
  • Joined:  04/02/12
  • Last Seen:  

Adding # in Freebie makes the quest 1 per account, however, if it still doesn't work, try replacing your  first login map to new_2-1 then add warp to the Freebies Script. In this case, your first login will be in new_2-1 then if the player talk to the npc, he will automatically warped to prontera and save his coordinates there. I hope this will help. :)

prontera,160,187,4    script    Freebies    123,{
    mes "[Hello]";
    mes "[I can give you a free gift based on your future job.]";
    mes "[Please choose the correct item for the future job]";
    next;
    if(!#Freebie) {
        mes "Select one:";
        next;
        switch(select("Swordsman:Magician:Archer:Acolyte:Merchant:Thief")) {
            case 1:
                getitem 13758,1;
                getitem 969,20;
                getitem 1108,1;
                getitem 2104,1;
                getitem 4043,4; //Item for Swordsman
                set #Freebie, 1;
                warp "prontera", 150, 150;
                savepoint "prontera", 150, 150;
                end;
            case 2:
                getitem 13758,1;
                getitem 969,20;
                getitem 1108,1;
                getitem 2104,1;
                getitem 4043,4; //Item for Magician
                set #Freebie, 1;
                warp "prontera", 150, 150;
                savepoint "prontera", 150, 150;
                end;
            case 3:
                getitem 13758,1;
                getitem 969,20;
                getitem 1108,1;
                getitem 2104,1;
                getitem 4043,4; //Item for Archer
                set #Freebie, 1;
                warp "prontera", 150, 150;
                savepoint "prontera", 150, 150;
                end;
            case 4:
                getitem 13758,1;
                getitem 969,20;
                getitem 1108,1;
                getitem 2104,1;
                getitem 4043,4; //Item for Acolyte
                set #Freebie, 1;
                warp "prontera", 150, 150;
                savepoint "prontera", 150, 150;
                break;
            case 5:
                getitem 13758,1;
                getitem 969,20;
                getitem 1108,1;
                getitem 2104,1;
                getitem 4043,4; //Item for Merchant
                set #Freebie, 1;
                warp "prontera", 150, 150;
                savepoint "prontera", 150, 150;
                end;    
            case 6:
                getitem 13758,1;
                getitem 969,20;
                getitem 1108,1;
                getitem 2104,1;
                getitem 4043,4; //Item for Thief
                set #Freebie, 1;
                warp "prontera", 150, 150;
                savepoint "prontera", 150, 150;
                end;
                
            }
            close;
    }
   mes "[ Trololol ]";
   mes "You already receive your freebies!";
   close;

    OnInit:
    waitingroom "Get your freebies here ! ",0;
    end;
}
Edited by Patskie
Change to code
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.03
  • Content Count:  455
  • Reputation:   3
  • Joined:  06/19/12
  • Last Seen:  

yea good idea but its not what I wanted to do..

I want to set up script that one time used only to avoid abuser

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   0
  • Joined:  06/07/13
  • Last Seen:  

make a level requirement so only players with level of your choice can get it,
 
sample: for 150/50 server
 
make the requirement 140-150 or if you have auto leveler then make it 140-149 so players who use autoleveler will not be able to get the item..
 

prontera,147,159,4    script    Free Set NPC    562,{
    if(#zFreeset == 1) goto L_FreeFinish;
    if (BaseLevel<150) goto L_Notenough;
    if (BaseLevel>=175) goto L_Notenough;
   
    mes "[Hello]";
    mes "[I can give you a free gift based on your future job.]";
    mes "[Please choose the correct item for the future job]";
    next;
        mes "Select one:";
        next;
        switch(select("Swordsman:Magician:Archer:Acolyte:Merchant:Thief")) {
             case 1:
                getitem 13758,1;
                getitem 969,20;
                getitem 1108,1;
                getitem 2104,1;
                getitem 4043,4; //Item for Swordsman
                break;
 
            case 2:
                getitem 13758,1;
                getitem 969,20;
                getitem 1108,1;
                getitem 2104,1;
                getitem 4043,4; //Item for Magician
                break;
 
            case 3:
                getitem 13758,1;
                getitem 969,20;
                getitem 1108,1;
                getitem 2104,1;
                getitem 4043,4; //Item for Archer
                break;
                
            case 4:
                getitem 13758,1;
                getitem 969,20;
                getitem 1108,1;
                getitem 2104,1;
                getitem 4043,4; //Item for Acolyte
                break;
            
            case 5:
                getitem 13758,1;
                getitem 969,20;
                getitem 1108,1;
                getitem 2104,1;
                getitem 4043,4; //Item for Merchant
                break;
            
            case 6:
                getitem 13758,1;
                getitem 969,20;
                getitem 1108,1;
                getitem 2104,1;
                getitem 4043,4; //Item for Thief
                break;
                
        }
        set #zFreeset, 1;
        close;

    L_FreeFinish:
    mes "[Free Set NPC]";
        mes "Hey I remember you!  I already told you that you may only get a freebie once.";
        close;
   
    L_Notenough:
    mes "[Free Set NPC]";
        mes "You must be at Base level 150-174 only, Lvl 175 can't get this anymore sorry";
        close;
    OnInit:
    waitingroom "Free set here! ",0;
    end;
    }

 

 
i edited the above script and made this one, hope this is what your are looking for. If you want to remove the level requirement just remove the part
 

    if (BaseLevel<150) goto L_Notenough;
    if (BaseLevel>=175) goto L_Notenough;
 

    L_Notenough:
    mes "[Free Set NPC]";
        mes "You must be at Base level 150-174 only, Lvl 175 can't get this anymore sorry";
        close;

Edited by kerbiii
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

yea good idea but its not what I wanted to do..

I want to set up script that one time used only to avoid abuser

This one :

prontera,160,187,4    script    Freebies    123,{
    query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`= '" + getcharid(3) + "'", .@lip$);
    mes "[Hello]";
    mes "[I can give you a free gift based on your future job.]";
    mes "[Please choose the correct item for the future job]";

    if(!#Freebie && ( getd("$" + .@lip$ + "_ASD") == 0 )) {
        mes "Select one:";
        next;
        switch(select("Swordsman:Magician:Archer:Acolyte:Merchant:Thief")) {
            case 1:
                getitem 13758,1;
                getitem 969,20;
                getitem 1108,1;
                getitem 2104,1;
                getitem 4043,4; //Item for Swordsman
                break;

            case 2:
                getitem 13758,1;
                getitem 969,20;
                getitem 1108,1;
                getitem 2104,1;
                getitem 4043,4; //Item for Magician
                break;

            case 3:
                getitem 13758,1;
                getitem 969,20;
                getitem 1108,1;
                getitem 2104,1;
                getitem 4043,4; //Item for Archer
                break;
                
            case 4:
                getitem 13758,1;
                getitem 969,20;
                getitem 1108,1;
                getitem 2104,1;
                getitem 4043,4; //Item for Acolyte
                break;
            
            case 5:
                getitem 13758,1;
                getitem 969,20;
                getitem 1108,1;
                getitem 2104,1;
                getitem 4043,4; //Item for Merchant
                break;
            
            case 6:
                getitem 13758,1;
                getitem 969,20;
                getitem 1108,1;
                getitem 2104,1;
                getitem 4043,4; //Item for Thief
                break;
                
            }
            set #Freebie, 1;
            setd "$" + .@lip$ + "_ASD", getd("$" + .@lip$ + "_ASD") + 1;
            close;
    }
    OnInit:
    waitingroom "Get your freebies here ! ",0;
    end;
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  5
  • Reputation:   0
  • Joined:  08/13/14
  • Last Seen:  

thank you patskie

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