Jump to content
  • 0
Eucharist96

Npc for newbie? (Freebies)

Question

33 answers to this question

Recommended Posts

prontera,155,181,5 script Sample 718,{
if( !#Freebies ){
set #Freebies,1;
mes "Welcome...this is your gift...";
getitem 607,10;
getitem 7539,10;
}else{
mes "You have claim the Reward already.";
}
close;
}

if you want to make it Character Based..

change All #Freebies into Freebies

Edit the Price here

getitem 607,10;
getitem 7539,10;

  • Upvote 2
Link to comment
Share on other sites

  • 0

i use newbie reward script like page 1, base on Account, and i got problem, all ID in CBT season can't take in OBT season?? can someone tell me how to fix? i want all ID in CBT season can take reward in OBT season.

Link to comment
Share on other sites

  • 0
On 9/12/2011 at 9:06 AM, Emistry said:

 

prontera,155,181,5 script Sample 718,{
if( !#Freebies ){
set #Freebies,1;
mes "Welcome...this is your gift...";
getitem 607,10;
getitem 7539,10;
}else{
mes "You have claim the Reward already.";
}
close;
}
 

 

if you want to make it Character Based..

change All #Freebies into Freebies

Edit the Price here

 

getitem 607,10;
getitem 7539,10;
 

 

Hello dear

Technical consultation: if the emulator is restarted, will the players who already claimed their prize be able to do it again?

Link to comment
Share on other sites

  • -1

Or you can use this one.

This will automatically give your new player the freebies when they login.

This is Account-Based.

If you want to make it Character-Based, as "Master Emistry" Said, make the two "#givenStartItems" into "givenStartItems"

- script ItemGiver 1,{
OnPCLoginEvent:
if(!#givenStartItems) {
set #givenStartItems, 1;
//=== Freebies
getitem <item_id>, <quantity>;
}
end;
}

PS: if you want an item to have an expiration, use "rentitem" instead of "getitem"

Edited by Diconfrost VaNz
  • Upvote 2
Link to comment
Share on other sites

Just a note for the thread starter.

If you put '#' like #Freebies, this will be account based, meaning the other characters will not get their freebies.

If you do what Emistry said, then it will be character based.

NOTE: Character based freebies can abused like (create-storage-delete-create) method. To prevent this thing, you must add the Freebies to item_trade.txt and make it non-tradeable, non-storageable, non-dropable.

Link to comment
Share on other sites

hello guys..i wanna ask..

the "rentitem" is no-tradeable/no-dropable/no-storageable...is it possible to make it no-tradeable/no-dropable only...?

but storageable...

now i'm lookin where to change this "rentitem" function...help me please.... :D

Link to comment
Share on other sites

=____=" just now im figured that "rentitem" on my server just notradeable/nodropable only...but storageable...without any modification on db/item_notrade.txt ... :D

anyone can explain?

Link to comment
Share on other sites

prontera,155,181,5 script Sample 718,{
if( !#Freebies ){
set #Freebies,1;
mes "Welcome...this is your gift...";
getitem 607,10;
getitem 7539,10;
}else{
mes "You have claim the Reward already.";
}
close;
}

if you want to make it Character Based..

change All #Freebies into Freebies

Edit the Price here

getitem 607,10;
getitem 7539,10;

i use this script on my server but the npc didnt show up. what would be the problem tho?

here is the script

prontera,90,200,5 Freebies 718,{
if( !#Freebies ){
set #Freebies,1;
mes "Welcome...this is your gift...";
getitem 1530,1;
getitem 2410,1;
getitem 2630,2;
getitem 14232,50;
}else{
mes "You have claim the Reward already.";
}
close;
}

Link to comment
Share on other sites

check the server error output, it probably told you that the syntax is broken.

either copy paste the code from here:

http://upaste.me/index.php?show=17980

or do the following:

prontera,90,200,5<tab>script<tab>Freebies<tab>718,{

Also you forgot to copy over the "script" between ,5 and Freebies

Link to comment
Share on other sites

do the following:

prontera,90,200,5<tab>script<tab>Freebies<tab>718,{

Also you forgot to copy over the "script" between ,5 and Freebies

i did this and it works, thanks . i have 1 question. how to put a pub above the npc ?

Link to comment
Share on other sites

I don't know where to put that codes but you can copy it here :

http://pastebin.com/raw.php?i=Y6QZUKWi

OnInit:
waitingroom "Chat Room Message",0;
end;
}

^Script is given by Emistry, Thanks to him !

Edited by Paulinds
Link to comment
Share on other sites

I suggest putting OnInit: either at the bottom of the script, prevents it from accidently executing..

prontera,90,200,5   script   Freebies   718,{
if( !#Freebies ){
  set #Freebies,1;
  mes "Welcome...this is your gift...";
  getitem 1530,1;
  getitem 2410,1;
  getitem 2630,2;
  getitem 14232,50;
  close;
}else{
  mes "You have claim the Reward already.";
  close;
}
OnInit:
waitingroom "Freebies Here",0;
end;
}

Link to comment
Share on other sites

I suggest putting OnInit: either at the bottom of the script, prevents it from accidently executing..
 prontera,90,200,5 script Freebies 718,{ if( !#Freebies ){ set #Freebies,1; mes "Welcome...this is your gift..."; getitem 1530,1; getitem 2410,1; getitem 2630,2; getitem 14232,50; close; }else{ mes "You have claim the Reward already."; close; } OnInit: waitingroom "Freebies Here",0; end; } 

prontera,90,200,5 script Freebies 718,{

if( !#Freebies ){

set #Freebies,1;

mes "Welcome To...this is your gift...";

getitem 1530,1;

getitem 2410,1;

getitem 2630,2;

getitem 14232,50;

close;

}else{

mes "You have claim the Reward already.";

close;

}

OnInit:

waitingroom "Freebies Here",0;

end;

}

i tried to upload this script but the npc just disappear. i think it have something wrong in the script. but when i remove the oninit: thingy the npc is working fine. any suggestion? Edited by AllHailToTheKing
Link to comment
Share on other sites

i tried to upload this script but the npc just disappear. i think it have something wrong in the script. but when i remove the oninit: thingy the npc is working fine. any suggestion?

Any errors in the map server?

The code below seems to work fine with a @loadnpc + @reloadscript.

prontera,90,200,5	script	Freebies	718,{
if( !#Freebies ) {
set #Freebies,1;
mes "Welcome...this is your gift...";
getitem 1530,1;
getitem 2410,1;
getitem 2630,2;
getitem 14232,50;
close;
} else {
mes "You have claim the Reward already.";
close;
}
OnInit:
waitingroom "Freebies Here",0;
end;
}

how to give +7 equipment ? n zeny 50m

Use the getitem2 script command.

getitem2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>};

For example if you want to give a newbie one +7 Tidal Shoes you add:

getitem2 2424,1,1,7,0,0,0,0,0;

For giving 50 million zeny add:

set Zeny, Zeny + 50000000;

Link to comment
Share on other sites

Sir Nameless what about IP base? i mean you cannot get anymore freebies if you already get it even if you create another account...

Link to comment
Share on other sites

Please take note that IP address can be easily changed.

Anyway, this is the script:

amatsu,116,146,3 script Seyra 90,{

set [email protected]$, "[seyra]";
setarray [email protected][0],2115,1,2357,1,2421,1,2524,1; // Rewards: <item id>,<item amount>

query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`=" + getcharid(3) + "", [email protected]$);

if ( getd("$" + [email protected]$ + "_NG") > 0 || #NewbieGift > 0)
{
mes [email protected]$;
mes "I'm sorry, the rewards are exclusively for new players.";
close;
}

mes [email protected]$;
mes "Welcome! Here are some free gifts"; 
mes "for newcomers:";

for ( set [email protected], 0; [email protected] < getarraysize([email protected]); set [email protected], [email protected] + 2 )
mes [email protected][[email protected]+1] + " x " + getitemname([email protected][[email protected]]);

close2;
set #NewbieGift, 1;
setd "$" + [email protected]$ + "_NG", getd("$" + [email protected]$ + "_NG") + 1;

for ( set [email protected], 0; [email protected] < getarraysize([email protected]); set [email protected], [email protected] + 2 )
getitem [email protected][[email protected]], [email protected][[email protected]+1];

end;

OnInit:

waitingroom "Newbie Gift!",0;
end;

}

Link to comment
Share on other sites

Hey guys, what if:

1: I'd like to make it so they can select one item from a list of about 6 items which one they wanted ( account based )

2: It would be 1 random item from a list of 6 items ( also account based )

Thanks

Link to comment
Share on other sites

Cephaler I suggest you take the scrpt they gave farther up the post and then study doc/script_commands.txt for your answer. Try looking up what switch, prompt, and select does. It will show you how to make menus that players can select that you can add in the previous script. I could easily do this for you, but that was how I learned by expermenting with stuff!

Peopleperson49

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

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.