Jump to content
  • 0

Item Spawner


Saisho

Question


  • Group:  Members
  • Topic Count:  52
  • Topics Per Day:  0.01
  • Content Count:  185
  • Reputation:   20
  • Joined:  01/06/13
  • Last Seen:  

hello :3

i know its kinda lame make my first post as a request but i really need the script and idk how to make it.

idk if thats possible but i need a npc that you punch in the item ID (any from db) plus amount and the npc add the chosen item/number to the char inventory.

thats mostly to help low lvl gms w/ prizes and have some control over it since an npc can easily be turned on/off.

if anyone can help me plz let me know :3

Link to comment
Share on other sites

8 answers to this question

Recommended Posts


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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

try search the keyword itemizer

plenty on this forum

and you forgot checkweight as well

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  52
  • Topics Per Day:  0.01
  • Content Count:  185
  • Reputation:   20
  • Joined:  01/06/13
  • Last Seen:  

i had a look around and the closest i found was the char manager v1-1 by llchrisll but still i dont see how to inject armor enchant on it since we have to choose the cards from a shop.

maybe im just too tired to think or too dumb to understand... /swt

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

the closest i found was the char manager v1-1 by llchrisll but still i dont see how to inject armor enchant on it since we have to choose the cards from a shop.
I also think its weird, his script has "Test_Headgear" card shop npc as float,

but doesn't have any callshop "Test_Headgear"; command around

dunno whats the meaning of it

http://rathena.org/board/topic/75216-itemizer-with-delay/#entry161901

I dunno if you couldn't find hard enough, but here's mine

is the armor enchant has anything to do with this topic ?

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  52
  • Topics Per Day:  0.01
  • Content Count:  185
  • Reputation:   20
  • Joined:  01/06/13
  • Last Seen:  

thx Annie i gonna try it :3

well i was looking for one w/ the armor enchant as part of the itemizer so it will be perfect for what i want

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

/*
create table log.gm_item_giver (
id int(11) not null auto_increment primary key,
`time` datetime,
gm_give varchar(23),
receiver varchar(23),
nameid smallint(6),
amount smallint(6),
refine tinyint(4),
card0 smallint(6),
card1 smallint(6),
card2 smallint(6),
card3 smallint(6)
) engine = archive;
*/

//	~~~~~ show time left in days, hours, minutes and seconds ~~~~~
function	script	timeleft__	{
if ( ( .@left = getarg(0) ) <= 0 ) return getarg(0);
set .@day, .@left / 86400;
set .@hour, .@left % 86400 / 3600;
set .@min, .@left % 3600 / 60;
set .@sec, .@left % 60;
if ( .@day )
	return .@day +" day "+ .@hour +" hour";
else if ( .@hour )
	return .@hour +" hour "+ .@min +" min";
else if ( .@min )
	return .@min +" min "+ .@sec +" sec";
else
	return .@sec +" sec";
}

prontera,155,184,4	script	dksfjskjf	100,{
if ( getgmlevel() < .eventgmlevel ) end;
mes "input the player name";
next;
if ( input( .@name$, 4, 23 ) ) close;
else if ( !( .@aid = getcharid(3, .@name$) ) ) {
	mes "player not exist or not online";
	close;
}
else if ( .@aid == getcharid(3) ) {
	mes "that's you ... baka";
	close;
}
.@name$ = rid2name(.@aid);
mes "select the item to give";
next;
.@s = select( .menu$ ) -1;
if ( getd( "#gm_give_"+ .itemid[.@s] ) + .delay[.@s] * 60 > gettimetick(2) ) {
	mes "you still can't give this prize to players";
	mes "time left: "+ callfunc( "timeleft__", getd( "#gm_give_"+ .itemid[.@s] ) + .delay[.@s] * 60 - gettimetick(2) );
	close;
}
mes "input amount to give.";
mes "max = "+ .maxamount[.@s];
next;
if ( input( .@amount, 1, .maxamount[.@s] ) ) close;
mes "input refine";
next;
if ( input( .@refine, 0, 100 ) ) close;
for ( .@i = 0; .@i < 4; .@i++ ) {
	mes "input card "+ ( .@i +1 );
	if ( input( .@card[.@i], 0, 32767 ) ) close;
	else if ( !.@card[.@i] ) ;
	else if ( getitemname( .@card[.@i]  ) == "null" ) {
		mes "no such item exist";
		close;
	}
	else if ( getiteminfo( .@card[.@i], 2 ) != 6 ) {
		mes "the input itemID is not a card";
		close;
	}
}
next;
mes "are you sure want to give";
.@itemid = .itemid[.@s];
mes .@name$ +" "+ .@amount +" "+ callfunc( "getitemname2", .@itemid, 1, .@refine, 0, .@card[0], .@card[1], .@card[2], .@card[3] ) +" ?";
next;
if ( select ( "Yes", "No" ) == 2 ) close;
else if ( !isloggedin(.@aid) ) {
	mes "player suddenly log off";
	close;
}
.@origin = getcharid(3);
attachrid .@aid;
if ( !checkweight( .itemid[.@s], .@amount ) ) {
	attachrid .@origin;
	mes "player is currently overweight";
	close;
}
getitem2 .itemid[.@s], .@amount, 1, .@refine, 0, .@card[0], .@card[1], .@card[2], .@card[3];
attachrid .@origin;
announce strcharinfo(0) +" give "+ .@name$ +" "+ .@amount +" "+ callfunc( "getitemname2", .@itemid, 1, .@refine, 0, .@card[0], .@card[1], .@card[2], .@card[3] ), 0;
setd "#gm_give_"+ .itemid[.@s], gettimetick(2);
query_logsql "insert into gm_item_giver values ( null, now(), '"+ escape_sql( strcharinfo(0) ) +"', '"+ escape_sql(.@name$) +"', "+ .itemid[.@s] +", "+ .@amount +", "+ .@refine +", "+ .@card[0] +","+ .@card[1] +","+ .@card[2] +","+ .@card[3] +")";
close;
OnInit:
.eventgmlevel = 60; // event gm level
setarray .itemid, 501, 502, 1201, 1101; // the only item id to give
setarray .maxamount, 1000, 100, 1, 1; // maximum amount of item to give. this is give 1000 red pot maximum
setarray .delay, 1, 2, 1, 1; // delay in minute
// can give red potion , max 1000, delay 1 minute
// can give orange potion, max 100, delay 2 minute

.@size = getarraysize( .itemid );
for ( .@i = 0; .@i < .@size; .@i++ )
	.menu$ = .menu$ + getitemname( .itemid[.@i] ) +":";
end;
}

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

@AnnieRuru

You forgot to post getitemname2's function.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

yeah I just realized my getitemname2 function was outdated

so I just made a new one

its 700 lines script btw ...

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