Jump to content
  • 0

Npc for newbie? (Freebies)


Question

Recommended Posts

Posted

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
  • 0
Posted

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.

  • 0
Posted
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?

  • -1
Posted (edited)

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
Posted

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.

Posted

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

Posted

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

Posted

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;
}

Posted

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;
}

Posted (edited)
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
Posted

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;

Posted

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;

}

Posted

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

Posted (edited)

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

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