Jump to content
  • 0

Npc for newbie? (Freebies)


Eucharist96

Question


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  54
  • Reputation:   2
  • Joined:  12/09/11
  • Last Seen:  

can some one help me to make a Npc for newbie?? (Freebies)

Link to comment
Share on other sites

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

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
  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  2
  • Reputation:   1
  • Joined:  02/11/16
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   3
  • Joined:  04/13/15
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  974
  • Reputation:   41
  • Joined:  11/13/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  566
  • Reputation:   34
  • Joined:  11/17/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  54
  • Reputation:   2
  • Joined:  12/09/11
  • Last Seen:  

Thanks sry late answer for Thanks i have many things to do in my class =(

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  49
  • Reputation:   1
  • Joined:  03/15/12
  • Last Seen:  

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


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

no you cant...

but you can do it by using the db/item_notrade.txt

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  49
  • Reputation:   1
  • Joined:  03/15/12
  • Last Seen:  

=____=" 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


  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  235
  • Reputation:   0
  • Joined:  11/22/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  351
  • Reputation:   52
  • Joined:  11/15/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  235
  • Reputation:   0
  • Joined:  11/22/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  142
  • Topics Per Day:  0.03
  • Content Count:  511
  • Reputation:   7
  • Joined:  02/15/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  351
  • Reputation:   52
  • Joined:  11/15/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  235
  • Reputation:   0
  • Joined:  11/22/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  120
  • Reputation:   0
  • Joined:  01/03/12
  • Last Seen:  

how to give +7 equipment ? n zeny 50m

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   4
  • Joined:  12/05/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   0
  • Joined:  04/02/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  341
  • Reputation:   43
  • Joined:  01/10/12
  • Last Seen:  

Please take note that IP address can be easily changed.

Anyway, this is the script:


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

set .@n$, "[seyra]";
setarray .@rwd[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) + "", .@lip$);

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

mes .@n$;
mes "Welcome! Here are some free gifts"; 
mes "for newcomers:";

for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 2 )
mes .@rwd[.@i+1] + " x " + getitemname(.@rwd[.@i]);

close2;
set #NewbieGift, 1;
setd "$" + .@lip$ + "_NG", getd("$" + .@lip$ + "_NG") + 1;

for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 2 )
getitem .@rwd[.@i], .@rwd[.@i+1];

end;

OnInit:

waitingroom "Newbie Gift!",0;
end;

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  120
  • Reputation:   0
  • Joined:  01/03/12
  • Last Seen:  

how about to give everyday reward & Loyalty reward ? can anyone help me ?

Edited by sapu1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  177
  • Reputation:   9
  • Joined:  06/25/12
  • Last Seen:  

How about freebies for every ip?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

@zeek..

post#18 ???

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  177
  • Reputation:   9
  • Joined:  06/25/12
  • Last Seen:  

ohhh sorry ok ok i saw it

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  132
  • Reputation:   2
  • Joined:  02/02/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

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