Jump to content
  • 0
Begin

NPC with a Promo Code

Question

Hi everyone!

May I request for an NPC that is same with this: 

 

I already tried the script and it is working but the Promo Code is random and I also set the limit to 3 and talked once but the NPC is saying that the redeem code doesn't exist.

Is it possible to edit or make a script like:

- Set up the Promo code thru NPC

- Input limit usage in promo codes (attached link can already do this)

- Handle multiple promo codes (attached link can already do this)

- Able to input date to the promo and the promo will be automatically deleted after the selected date/time

- Able to make the selected promo code to infinite time/permanent but can be deleted (for Freebies/Give aways)

- Able to input the desired item and amount thru NPC

Thank you very much!

random.PNG

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0

https://rathena.org/board/topic/115232-script-doesnt-recognize-spaces/

can somebody actually explain to me what's this promotion code does ?
all I understand is GM generate a random gibberish alphabets and numbers
and players input a random gibberish alphabets and numbers, then they get the item ?

imo ... if the goal is to let GM gives item to the player, why not just give the player item directly by mailing them ?

Share this post


Link to post
Share on other sites
  • 0

Hello Ms. Annie,

Giving an items thru mail is so hard if you have more than 100+ players. Promo Code NPC can also be used to to your Donation NPC if  you have a promo like from June 9-15, 2018 only or after maintenance and you extended it for 5 hours and you want to give a compensation, a fun way of giving it is to use a Promo Code and get it thru NPC. I already saw this in various ragnarok servers and even the official ROPH but I can't find it here in hercules.

Thank you.

Share this post


Link to post
Share on other sites
  • 0

hmm .. then how do the official server actually preventing players from using the SAME promotion code for multiple accounts ?

because when I was fixing the script on rathena forum... I already noticed this
1. each account can only clam once
2. each IP can only claim once <-- not safe
3. use *getitembound ... ok I have no objection

so I can abuse the system with,
1. after I got a promotion code, that can claim 10 times,
2. login an account, claim once ....
3. logout the game, restart the modem, shuffle your IP address
4. login another account, claim again
repeat 10 times


ok, let's say generate 100 different codes for 100 different donors... so they can use each code only once (limit 100 times)
means generating 100 different codes for each player ... this only makes the GMs confused which code has been used b4 ...
instead give out some gibberish word that you have sure which code is available, why not just give the item to them by let the player click on the npc ?


unless I can clear out these doubts, I'm not going to make this scripts ... seems exploitable ...
or maybe someone who actually has used this system b4, know how this system works, release a script for it so I can take a peek ...
because all the promotion npc on the forum(hercules/rathena) can be exploit in some way


2 hours ago, Begin said:

if  you have a promo like from June 9-15, 2018

prontera,155,185,5	script	Reward/Compensation	1_F_MARIA,{
	if ( #Compensation_June2018 ) {
		mes "you have claimed compensation";
		close;
	}
	mes "We apologize for blah blah blah";
	mes "so I give you a candy";
	if ( !checkweight(Candy,1) ) {
		mes "hahaha you don't even has enough space to claim a candy hahaha";
		close;
	}
	getitembound Candy, 1, 1;
	#Compensation_June2018 = 1;
	close;
OnInit:
OnHour00:
	if ( gettime(GETTIME_MONTH) == JUNE && gettime(GETTIME_DAYOFMONTH) >= 9 && gettime(GETTIME_DAYOFMONTH) <= 15 )
		enablenpc strnpcinfo(0);
	else
		disablenpc strnpcinfo(0);
	end;
}

for me its a simple script ...
but now you actually struct me with an idea to actually write one that can configure the time and the prize given.......

Share this post


Link to post
Share on other sites
  • 0

Thank you for this script, Ms. Annie! Your idea that the time and prize will be configurable will be a good script for us!

Attached photo is the example of the promo/item code but that is based on WebCP.

roph.PNG

Edited by Begin
attached photo

Share this post


Link to post
Share on other sites
  • 0
49 minutes ago, Begin said:

Attached photo is the example of the promo/item code but that is based on WebCP.

roph.PNG

how do the players input this BV9F-JSM1 ... code ?
inside fluxCP ?
then the fluxCP automatically send mail to the account ?

Share this post


Link to post
Share on other sites
  • 0

Once logged in in the WebCP, they will click the Compensation Button and will type that code and the items will automatically put in your selected character's inventory. But I think it's too hard to do that (because I don't have the skills) so I'm just asking for an NPC haha

Share this post


Link to post
Share on other sites
  • 0
40 minutes ago, Begin said:

Once logged in in the WebCP, they will click the Compensation Button and will type that code and the items will automatically put in your selected character's inventory. But I think it's too hard to do that (because I don't have the skills) so I'm just asking for an NPC haha

yes this is obviously FluxCP ... need PHP knowledge ... and I don't have XD

 

items automatically place inside player's inventory ?
what would happen if the player was already carrying 100 type of items ?
let me test ...

prontera,155,185,5	script	ksdfhsf	1_F_MARIA,{
	freeloop true;
	.@cid = getcharid(0);
	for ( .@i = 500; .@i < 1000; ++.@i ) {
		if ( getitemname(.@i) != "null" ) {
			getitem .@i, 1;
			if ( !checkweight(.@i,1) ) { // give item until full MAX_INVENTORY
				atcommand "@kick "+ strcharinfo(0);
				sleep 1000;
				for ( ; .@i < 1000; ++.@i ) { // continue give item until 1000 ...
					if ( getitemname(.@i) != "null" )
						query_sql "insert into inventory ( char_id, nameid, amount, identify ) values ( "+ .@cid +", "+ .@i +", 1, 1 );";
				}
				break;
			}
		}
	}
	end;
}

seems player load data with 100 items ...
if you store some item inside storage(have 98/100), and then relog,
the item will suddenly appear back to 100/100), 2 more items loaded

 

anyway this totally confirm my doubt ...
promotion code is something to be done on the FluxCP, not with npc scripting

Share this post


Link to post
Share on other sites
  • 0

Really? Thanks for the effort Ms. Annie. Do you release that type of NPC on the first script that you replied? The one that can configure the time and prize given? I will surely wait for that time! :D

Share this post


Link to post
Share on other sites
  • 0
prontera,155,185,5	script	Reward/Compensation	1_F_MARIA,{
	if ( #Compensation_June2018 ) {
		mes "you have claimed compensation";
		close;
	}
	mes "We apologize for blah blah blah";
	mes "so I give you a candy";
	if ( !checkweight(Candy,1) ) {
		mes "hahaha you don't even has enough space to claim a candy hahaha";
		close;
	}
	getitembound Candy, 1, 1;
	#Compensation_June2018 = 1;
	close;
OnInit:
OnHour00:
	if ( gettime(GETTIME_MONTH) == JUNE && gettime(GETTIME_DAYOFMONTH) >= 9 && gettime(GETTIME_DAYOFMONTH) <= 15 )
		enablenpc strnpcinfo(0);
	else
		disablenpc strnpcinfo(0);
	end;
}

@AnnieRuru can you make it account bound? i will just put box with item cant be trade sell or drop, if possible GM can configure to create custom code or generate random code? 

Edited by Dolphincute

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

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