Jump to content
  • 0

Talking prize npc! pls fast help


Rage Guy

Question


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  354
  • Reputation:   3
  • Joined:  02/17/13
  • Last Seen:  

i want npc like that pls

 

in english

 

- Personal Prize

 

- Server Prize

 

________
 

Server prize for every one

 

they need to talk to this npc to take the prize

 

post-15217-0-75909800-1370303184_thumb.jpg

Link to comment
Share on other sites

23 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1125
  • Reputation:   236
  • Joined:  07/30/12
  • Last Seen:  

Why not use Euphy's Item Reward?

 

//===== eAthena Script =======================================
//= Item Rewards NPC
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.8
//===== Description: =========================================
//= Useful for event rewards, when a player is not necessarily online.
//= Logging is available, if needed (holds 128 names).
//= Note: Unclaimed rewards are limited to 64 at a time.
//============================================================

prontera,156,195,6	script	Item Rewards	836,{

// --------------------- Config ---------------------
// Package format is "ID1,Count1,ID2,Count2,..."
// GM Access: Level required to open the GM menu.
// GM Delete: Level required to erase entries.
// GM Logging: Level required to manage logs.

	set .GMAccess,60;
	set .GMDelete,80;
	set .GMLogging,99;
	set .PackageCount,3;
	setarray .Package1[0],501,1,502,2,503,3;
	setarray .Package2[0],601,5,602,10;
	setarray .Package3[0],607,10;

// --------------------------------------------------

	if (getgmlevel() >= .GMAccess) goto GM_Menu;
	mes "[Item Rewards]";
	set .@i,0;
	while (.@i < getarraysize($itemreward$)) {
		if (strcharinfo(0) == $itemreward$[.@i]) goto GetReward;
		set .@i, .@i+2; }
	mes "You have no rewards pending.";
	close;

GetReward:
	if (((Weight*100)/MaxWeight) > 49) {
		mes "You are over the weight limit."; close; }
	if (!checkweight(5055,getarraysize(getd(".Package"+$itemreward$[.@i+1])))) {
		mes "Clear space in your inventory."; close; }
	set .@j,0;
	while (.@j < getarraysize(getd(".Package"+$itemreward$[.@i+1]))) {
		getitem getd(".Package"+$itemreward$[.@i+1]+"["+.@j+"]"),getd(".Package"+$itemreward$[.@i+1]+"["+(.@j+1)+"]");
		set .@j, .@j+2; }
	specialeffect2 248;
	deletearray $itemreward$[.@i],2;
	mes "Here you go!";
	close;

OnMinute00:
OnMinute30:
	if (!getarraysize($itemreward$)) end;
	set .@i,0;
	while (.@i < getarraysize($itemreward$)) {
		message $itemreward$[.@i],"[You have a reward pending.  See the Item Rewards NPC.]";
		sleep 10;
		set .@i, .@i+2; }
	end;

GM_Menu:
	mes "[Item Rewards]";
	mes "What would you like to do?";
	next;
	switch(select(" ~ ^FF55FFPackage information^000000: ~ ^FF55FFList unclaimed rewards^000000: ~ ^00D900Give a reward^000000: ~ "+((getgmlevel()<.GMDelete)?"^777777":"^DE0000")+"Delete a reward^000000: ~ "+((getgmlevel()<.GMDelete)?"^777777":"^DE0000")+"Delete all unclaimed rewards^000000: ~ "+((getgmlevel()<.GMLogging)?"^777777":"^55AAFF")+"Manage logs^000000: ~ [Close]")) {
		case 1:
			mes "[Item Rewards]";
			set .@j,1;
			while (getd(".Package"+.@j)) {
				mes "^660099Package " + .@j + ":^000000";
				set .@i,0;
				while (.@i < getarraysize(getd(".Package"+.@j))) {
					mes " ~ " + getd(".Package"+.@j+"["+(.@i+1)+"]") + "x " + getitemname(getd(".Package"+.@j+"["+(.@i)+"]"));
					set .@i, .@i+2; }
				set .@j, .@j+1; }
			next;
			goto GM_Menu;
		case 2:
			mes "[Item Rewards]";
			mes "Used space: ^F52887" + (getarraysize($itemreward$)/2) + "^000000/64";
			mes "--------------------------------";
			set .@i,0;
			while (.@i < getarraysize($itemreward$)) {
				mes "^B041FF" + $itemreward$[.@i] + "^000000: package #" + $itemreward$[.@i+1];
				set .@i, .@i+2; }
			next;
			goto GM_Menu;
		case 3:
			mes "[Item Rewards]";
			if (getarraysize($itemreward$) > 127) {
				mes "No more names can be stored.";
				mes "Delete some values and try again.";
				next;
				goto GM_Menu; }
			mes "Input a name, then a package number.";
			input .@name$;
				query_sql "SELECT `char_id` FROM `char` WHERE `name` = '"+.@name$+"'",.@charid;
				if (!.@charid) { mes "The name is invalid."; next; goto GM_Menu; }
					else set .@charid,0;
			input .@package,1,.PackageCount;
			next;
			mes "[Item Rewards]";
			mes "Player: ^B041FF" + .@name$ + "^000000";
			mes "Package: ^B041FF#" + .@package + "^000000";
			mes " ";
			mes "Are you sure?";
			if (select("Yes:No") == 2) { mes "Request cancelled."; next; goto GM_Menu; }
			setarray $itemreward$[getarraysize($itemreward$)],.@name$,.@package;
			message .@name$,"[You have a reward pending.  See the Item Rewards NPC.]";
			if ($itemlog) {
				if (getarraysize($itemlog1$) > 127) {
					deletearray $itemlog1$[0],1;
					deletearray $itemlog2$[0],1; }
				setarray $itemlog1$[getarraysize($itemlog1$)],strcharinfo(0);
				setarray $itemlog2$[getarraysize($itemlog2$)],.@name$; }
			mes "Reward added.";
			next;
			goto GM_Menu;
		case 4:
			mes "[Item Rewards]";
			if (getgmlevel() < .GMDelete) {
				mes "You are not permitted to delete entries."; next; goto GM_Menu; }
			mes "Input a name to cancel a reward.";
			input .@name$;
			set .@i,0;
			while (.@i < getarraysize($itemreward$)) {
				if ($itemreward$[.@i] == .@name$) {
					deletearray $itemreward$[.@i],2;
					mes "Name cleared."; next; goto GM_Menu; }
				set .@i, .@i+2; }
			mes "The name is invalid.";
			next;
			goto GM_Menu;
		case 5:
			mes "[Item Rewards]";
			if (getgmlevel() < .GMDelete) {
				mes "You are not permitted to delete entries."; next; goto GM_Menu; }
			mes "^FF0000This action cannot be undone.^000000";
			mes "Are you sure?";
			mes " ";
			if (select("Yes:No") == 2) { mes "Request cancelled."; next; goto GM_Menu; }
			deletearray $itemreward$[0],getarraysize($itemreward$);
			mes "All entries cleared.";
			next;
			goto GM_Menu;
		case 6:
		Log_Menu:
			mes "[Item Rewards]";
			if (getgmlevel() < .GMLogging) {
				mes "You are not permitted to manage logs."; next; goto GM_Menu; }
			mes "Logs are currently "+(($itemlog)?"^00D900enabled^000000":"^FF0000disabled^000000")+".";
			next;
			switch(select(" ~ ^55AAFFView Logs^000000: ~ "+((!$itemlog)?"^00D900Enable":"^777777Disable")+" logging^000000: ~ ^DE0000Delete all logs^000000: ~ [Go back]")) {
				case 1:
					mes "[Item Rewards]";
					mes "Used space: ^F52887" + (getarraysize($itemlog1$)) + "^000000/128";
					mes "--------------------------------";
					set .@i,0;
					while (.@i < getarraysize($itemlog1$)) {
						mes "^B041FF" + $itemlog1$[.@i] + "^000000: sent to ^55AAFF" + $itemlog2$[.@i] + "^000000";
						set .@i, .@i+1; }
					next;
					goto Log_Menu;
				case 2:
					set $itemlog, ((!$itemlog)?1:0);
					goto Log_Menu;
				case 3:
					mes "[Item Rewards]";
					mes "^FF0000This action cannot be undone.^000000";
					mes "Are you sure?";
					mes " ";
					if (select("Yes:No") == 2) { mes "Request cancelled."; next; goto Log_Menu; }
					deletearray $itemlog1$[0],getarraysize($itemlog1$);
					deletearray $itemlog2$[0],getarraysize($itemlog2$);
					mes "Logs cleared.";
					next;
					goto Log_Menu;
				case 4:
					next;
					goto GM_Menu;
			}
		case 7:
			close;
	}
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  354
  • Reputation:   3
  • Joined:  02/17/13
  • Last Seen:  

how to make a package and name it?



pls tell me ==



where to name the package to use it in game !! pls answer me



and i want it for all who are online

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1125
  • Reputation:   236
  • Joined:  07/30/12
  • Last Seen:  


setarray .Package1[0],501,1,502,2,503,3;

setarray .Package2[0],601,5,602,10;

setarray .Package3[0],607,10;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  354
  • Reputation:   3
  • Joined:  02/17/13
  • Last Seen:  

can i send to all online players?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1125
  • Reputation:   236
  • Joined:  07/30/12
  • Last Seen:  

It's not for all players.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  354
  • Reputation:   3
  • Joined:  02/17/13
  • Last Seen:  

i want npc like that but send reward for all who are online

like the pic that i posted

if there is npc send for only online np

same to the one that i posted

ppl talk to him to take the prize

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1125
  • Reputation:   236
  • Joined:  07/30/12
  • Last Seen:  


prontera,155,170,5 script Gift 87,{

if( getgmlevel() < 60 ) end;

if( select( "Give an item", "Leave" ) -1 ) end;

input .@item_id;

if( getiteminfo( .@item_id,0 ) == -1 ) {

mes "Unknown item id.";

close;

}

input .@amount;

if( .@amount <= 0 ) {

mes "Invalid Amount";

close;

}

set .@item_name$, getitemname( .@item_id );

set .@gm_name$, strcharinfo(0);

do {

set .@size, query_sql( "SELECT `account_id` from `char` where `online` = '1' order by `account_id` desc limit "+ ( .@loop *128 ) +", 128", .@account_id );

for( set .@i, 0; .@i < .@size; set .@i, .@i +1 ) {

getitem .@item_id, .@amount, .@account_id[.@i];

message rid2name( .@account_id[.@i] ), "You get an "+ .@item_name$ +" from "+ .@gm_name$ +".";

}

set .@loop, .@loop +1;

}

while( .@size );

mes "Done.";

close;

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  354
  • Reputation:   3
  • Joined:  02/17/13
  • Last Seen:  

not working i want

npc ppl

need to talk to him to take the prize .

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1125
  • Reputation:   236
  • Joined:  07/30/12
  • Last Seen:  

1 prize in each player?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  354
  • Reputation:   3
  • Joined:  02/17/13
  • Last Seen:  

YES

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1125
  • Reputation:   236
  • Joined:  07/30/12
  • Last Seen:  


prontera,50,50,3 script PrizeNPC 123,{

if(#AlreadyClaim > 0) {

mes "You already claim your Prize!";

close;

}

mes "Do you want to claim your Prize?";

menu "Yup Sure!",-;

next;

mes "Here you go!";

getitem 512,1; //change for prize

set #AlreadyClaim,1;

close;

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  354
  • Reputation:   3
  • Joined:  02/17/13
  • Last Seen:  

no ==

 

i want the player can take it one time

and the gm make the prize add it for only online players



pls any answers

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

You can edit like this..

 

prontera,50,50,3	script	PrizeNPC	123,{
if(##AlreadyClaim > 0) {
mes "You already claim your Prize!";
close;
}
mes "Do you want to claim your Prize?";
menu "Yup Sure!",-;
next;
mes "Here you go!";
getitem 512,1; //change for prize
set ##AlreadyClaim,1;
close;
}

Reward for 1 ID, 1 Time only.

Edited by uDe
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  354
  • Reputation:   3
  • Joined:  02/17/13
  • Last Seen:  

he can make million char and take rew with them

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

he can make million char and take rew with them

 

Mine is for ID. Not char.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  354
  • Reputation:   3
  • Joined:  02/17/13
  • Last Seen:  

it will sent to only online players that can take the prize ?



Can u make it with ip ? or any thing ?



i dont want the player make 100 char and take with all of them ==

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

i dont want the player make 100 char and take with all of them ==

Can you tell the different between Char and ID?

 

Also, it's seem useless for giving item by IP because someone also can bypass that.

 

Read more : http://rathena.org/board/topic/73010-newbie-package-npc/#entry149749

 

Just do like Emistry said, use the trunk/db/re/item_trade.txt wisely.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  354
  • Reputation:   3
  • Joined:  02/17/13
  • Last Seen:  

or can i make this npc manual .

only prize for thise who are online in the second that the npc is added

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

I don't understand.  /spit

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  354
  • Reputation:   3
  • Joined:  02/17/13
  • Last Seen:  

prontera,50,50,3	script	PrizeNPC	123,{
if(##AlreadyClaim > 0) {
mes "لقد أستلمت جائزتك من قبل";
close;
}
mes "هل تريد أستلام جائزتك الأن";
menu "نعم أكيد",-;
next;
mes "ها انت ذا";
getitem 674,5; //change for prize
set ##AlreadyClaim,1;
close;
}

 

i want make this npc when i summon him to the city only ppl who online can take from him

like if some one opened after adding him he cant take any thing

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

So now, you just want a NPC to distribute item for ONLINE PLAYERS AT THE MOMENT ONLY? Like that?

 

If yes, then please read this : http://rathena.org/board/topic/74888-command-to-give-everyone-item/

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  354
  • Reputation:   3
  • Joined:  02/17/13
  • Last Seen:  

//===== eAthena Script ============================================
//= #itemall
//===== By: =======================================================
//= Originally by goddameit
//= redo by ~AnnieRuru~
//===== Current Version: ==========================================
//= 1.0
//===== Compatible With: ==========================================
//= eAthena 14910 Trunk TXT/SQL
//===== Description: ==============================================
//= give items to all players in the map, or on the server
//===== Topic =====================================================
//= http://www.eathena.ws/board/index.php?showtopic=276326
//===== Additional Comments: ======================================
//= topic splitted
//=================================================================

-	script	itemall	-1,{
OnWhisperGlobal:
	if ( getgmlevel() < 80 ) end; // configure minimum GM level here
	if ( compare( @whispervar0$, "map" ) )
		set .@map$, strcharinfo(3);
	else if ( compare( @whispervar0$, "all" ) == 0 ) {
		dispbottom "[itemall] Please enter \"map#<item id>#<item amount>\" or \"all#<item id>#<item amount>\"";
		end;
	}
	set .@itemid, atoi( @whispervar1$ );
	set .@amount, atoi( @whispervar2$ );
	if ( getiteminfo( .@itemid, 0 ) == -1 ) {
		dispbottom "[itemall] Invalid item ID";
		end;
	}
	if ( .@amount == 0 )
		set .@amount, 1;
	set .@origin$, strcharinfo(0);
	while ( .@i < $online_count ) {
		attachrid getd("$online_aid"+ .@i );
		if ( .@map$ == "" || strcharinfo(3) == .@map$ ) {
			message strcharinfo(0), .@origin$ +" gives you "+ .@amount +" "+ getitemname(.@itemid);
			getitem .@itemid, .@amount;
		}
		set .@i, .@i +1;
	}
	end;

OnPCLoginEvent:
	setd "$online_aid"+ $online_count, getcharid(3);
	set $online_count, $online_count +1;
	end;
OnPCLogoutEvent:
	while ( .@i < $online_count && getd("$online_aid"+ .@i ) != getcharid(3) )
		set .@i, .@i +1;
	if ( $online_count == .@i ) end; // prevent @loadnpc/@reloadscript bug becos not in the array
	while ( .@i < $online_count ) {
		setd "$online_aid"+ .@i, getd("$online_aid"+ ( .@i +1 ) );
		set .@i, .@i +1;
	}
	set $online_count, $online_count -1;
	end;
OnInit:
	if ( getusers(1) ) end;
	while ( .@i < $online_count ) {
		setd "$online_aid"+ .@i, 0;
		set .@i, .@i +1;
	}
	set $online_count, 0;
	end;
}

so . how to use thise?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

Apply it and check if there's any errors and if there's errors, post the errors at here and wait for somebody help you.

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