-
Posts
400 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by uDe
-
-
Im making new menus and upload the updated after so that close bug wont be happening in older version, i really dont know what causing you the problem of same ip can be claimed. Do you see any mapserver errors?
Thanks for the close button, and no error found on map-server while redeem the codes more than one.
reward_codes :
-
I am using the lastest svn.
#Prob 2: I wonder why close button doesnt appear on you. Im gonna make a special script for you no switch select i think that causing you no
close button problem gona change all of that to menu.
#Prob 3 && Prob 4: Its working fine on me, i think must fix ur sql first.
What error in Map Server appears?
SQL was fixed. But problems #2 and #3 still occur. Post above has been updated.
-
-
I see no more errors about sql now.. But I've edit my post at above also.. Please check..
-
Here's my reply . Thanks @Lil Troll
-
[06/Sep 12:17][SQL]: DB error - Unknown column 'promo' in 'field list' [06/Sep 12:17][Debug]: at script.c:14668 - SELECT `promo`,`pool` FROM `reward_codes` ORDER BY time_created DESC LIMIT 20 [06/Sep 12:17][Debug]: Source (NPC): liltrollcodes (invisible/not on a map)
1.
That happened when I use @code. Yes, I'm using your sql query.reward_code query at my localhost > db and rewardlogs query at localhost > log#1 Problem fixed : http://rathena.org/board/topic/87212-utility-promotional-code/#entry221607
2. No close button
Somehow you're missing close button at almost every mes.. Please fix it.. Thanks
3. Same ID/IP can redeem the same code more than 1 time.
4.
rewardlogs sql not working?I've redeem twice, and nothing was stored at this log..#4 Problem fixed : My mistake, I should install both sql under database.
-
Why not create multiple items so that people can claim and claim? If you
want it that way then it seems like creating this promo script is
useless. You can create an item reward npc wherein you can set your
prize and let your players get and get and get.
mes "Code for more than 1 use?";
It's mean that only 1 person per item and the code still can be use by other players. Personally for me, this is an another way to distribute rewards for players instead of talking to NPC.
For example, I'm going to use this script to promote my server at facebook and I just need to use 1 code only. Instead of giving 100+ codes. And don't worry, I won't give any trade-able items to prevent players to exploit this codes by creating new characters on their ID. It's good to have an option though..
Thanks for the opinion by the way. Still, I would really need that function.
Sorry for my cheap English Language.
EDIT
For close; problems, still didn't fix yet..
Here's the script :promo_codes.txt
-
What's wrong with rAthena Quote function? Loading so long and nothing..?
BTW, here's the problems from your script and sql queries above
1. No close button.
2. Still no close button.
3. SQL error?
4. No update on sql because of the errors above?
5. After using @code command, I can't move.
I really do want the important function from this script :
mes "Code for more than 1 use?"; if(select("Yes:No")==2) close; dispbottom "Promotional Code ^FF0000"+.@pcode$+" ^000000is now activated and the reward is ^FF0000"+.@amount+" "+.@iname$+"."; Query_SQL( "UPDATE `reward_codes` SET `confirmed` = '2' WHERE `code`='"+escape_sql(.@pcode$)+"'"); close;
And thank you @Patskie for your time for trying to help me.
-
So, then, I want to use the script that will save the redeem_time, accound_id and confirmed
and script than can fix those problems also :
2. Referring to SS above, there are 2 codes has been given. But there's no update also when I use "View existing codes" in-game.
3.
After ADMIN use @code > setup the code > finish. He can't move, seems like stuck with npc. Need to @load or @go. I found no problems with @claim commands.BUMP
-
As you can see, from my script, I've used playBGMall.
playBGMall "raiseurweapon";
So, every map will hear the song.
And the most important thing you must know about BGM is, you can't warp to other map while the song is playing. Example, if you start the song at Prontera town, you may warp within Prontera town and prt_in only. If your're warp to other map like Izlude town, dungeons, you can't hear the song anymore. It's because of every official maps got it's own BGM. So, when you're entering other map, the BGM of that map will play automatically and your song will cancelled. Just stay on the same map until the song's finish.
-
Currently I'm using this : http://rathena.org/board/topic/86986-promotionial-codes-script/#entry220578
Thought that @Patskie had it fixed.. But the 3 problems from my 1st post still didn't fix.
-
Hmm.. Why it will be deleted? @Patskie add it that right?
I think, from original script from here , it will saved right?
It really got me confuse. So, I just need the same thing like this post.
I really need the full 'logs'.. So I'm hoping that there are no conflicts with players. You know what happen when they got something 'free' right? Always want more.. Like me. Now.
-
Try this :
prontera,150,182,5 script Freebies 405,{ if(##sorry == 1) goto L_1; mes "Welcome to Dark Salvation RO"; mes "Thanks For Joining Us We Hope that You Will Make Us Your New Home"; next; getitem 2115,1; getitem 2357,1; getitem 2421,1; getitem 2524,1; emotion e_thx; set ##sorry,1; close; L_1: mes "We have already given your gift before!!!."; emotion e_bzz; close; OnInit: waitingroom "Freebies Here!",0,0; end; }
-
query_logsql("INSERT INTO `rewardlogs` (code,redeem_time,account_id) VALUES ('"+.@pc"', NOW(), '"+getcharid(3)+"')");
your reward logs was saved in a different table .....in the log scheme.
the sql table you shown above...is it the rewardlogs ??? or reward_codes ??? or ???
The screen shot above is from reward_codes
This is the rewardlogs :
and I think it's working fine.. Right?
There are 2 sql table that need to be install :
//=============================================================================== //SQL for DBmain /* DROP TABLE IF EXISTS `reward_codes`; CREATE TABLE IF NOT EXISTS `reward_codes` ( `code` VARCHAR(10) NOT NULL DEFAULT '', `nameid` INT(11) UNSIGNED NOT NULL DEFAULT '0', `item_name` VARCHAR(45) NOT NULL DEFAULT '', `amount` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', `time_created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `redeem_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', `confirmed` INT(11) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (`code`) ) ENGINE=MYISAM; */ // SQL for DBlog /* DROP TABLE IF EXISTS `rewardlogs`; CREATE TABLE `rewardlogs` ( `account_id` INT( 10 ) NOT NULL , `code` VARCHAR( 10 ) NOT NULL ) ENGINE = InnoDB; */ //===============================================================================
-
Saw this one in eAthena, I do not know if this is compatible with rAthena. I suggest you to use Harmony, but here's the code.
Index: socket.c =================================================================== --- socket.c (revision 13725) +++ socket.c (working copy) @@ -16,6 +16,7 @@ #ifdef WIN32 #include <winsock2.h> + #include <time.h> #include <io.h> #else #include <errno.h> @@ -112,7 +113,54 @@ sock_arr_len = fd+1; return fd; } + +#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS) + #define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64 +#else + #define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL +#endif +struct timezone +{ + int tz_minuteswest; /* minutes W of Greenwich */ + int tz_dsttime; /* type of dst correction */ +}; + +int gettimeofday(struct timeval *tv, struct timezone *tz) +{ + FILETIME ft; + unsigned __int64 tmpres = 0; + static int tzflag; + + if (NULL != tv) + { + GetSystemTimeAsFileTime(&ft); + + tmpres |= ft.dwHighDateTime; + tmpres <<= 32; + tmpres |= ft.dwLowDateTime; + + /*converting file time to unix epoch*/ + tmpres /= 10; /*convert into microseconds*/ + tmpres -= DELTA_EPOCH_IN_MICROSECS; + tv->tv_sec = (long)(tmpres / 1000000UL); + tv->tv_usec = (long)(tmpres % 1000000UL); + } + + if (NULL != tz) + { + if (!tzflag) + { + _tzset(); + tzflag++; + } + tz->tz_minuteswest = _timezone / 60; + tz->tz_dsttime = _daylight; + } + + return 0; +} + int sAccept(int fd, struct sockaddr* addr, int* addrlen) { SOCKET s; @@ -196,6 +244,9 @@ time_t last_tick; time_t stall_time = 60; +uint32 max_frequency_warning = 12; //Max number of packets user can have that are within a certain interval of each other before the program kicks +int diff_tolerance = 7000; //In microseconds + uint32 addr_[16]; // ip addresses of local host (host byte order) int naddr_ = 0; // # of ip addresses @@ -317,9 +368,37 @@ set_eof(fd); return 0; } - session[fd]->rdata_size += len; session[fd]->rdata_tick = last_tick; + + // Anti-WPE script by Zohan + if(!session[fd]->flag.server && (RFIFOW(fd,0) == 0x0438 || RFIFOW(fd,0) == 0x0116)) + { + session[fd]->lastDiff = session[fd]->thisDiff; + session[fd]->lastPacket.tv_sec = session[fd]->thisPacket.tv_sec; + session[fd]->lastPacket.tv_usec = session[fd]->thisPacket.tv_usec; + gettimeofday(&session[fd]->thisPacket, NULL); + session[fd]->thisDiff = (((session[fd]->thisPacket.tv_sec - session[fd]->lastPacket.tv_sec) * 1000000) + session[fd]->thisPacket.tv_usec) - session[fd]->lastPacket.tv_usec; + if(abs(session[fd]->thisDiff - session[fd]->lastDiff) < diff_tolerance) + { + session[fd]->warning_number++; + if(session[fd]->warning_number > max_frequency_warning) + { + set_eof(fd); + } + } + else if(session[fd]->thisPacket.tv_sec - session[fd]->lastPacket.tv_sec > 10) + { + session[fd]->warning_number = 0; + } + else + { + if(session[fd]->warning_number > 0) + { + session[fd]->warning_number--; + } + } + } return 0; }
Index: socket.h =================================================================== --- socket.h (revision 13725) +++ socket.h (working copy) @@ -83,6 +83,13 @@ size_t rdata_pos; time_t rdata_tick; // time of last recv (for detecting timeouts); zero when timeout is disabled + //Anti-WPE + struct timeval thisPacket; + struct timeval lastPacket; + int thisDiff; + int lastDiff; + uint32 warning_number; + RecvFunc func_recv; SendFunc func_send; ParseFunc func_parse;
Anyone had tried this at rAthena?
- script AntiWPEandRPE -1,{ OnPCLoginEvent: dispbottom "Do not use WPE/RPE."; end; }
Sadly, you can't do it with script.
Haha. Very sad!
Posted 30 August 2013 - 05:59 PM
Posted 15 June 2013 - 05:33 PM
either request at rAthena to convert it, or change to using Hercules
Hercules devs will not create this for rAthena o_O
Dem~
-
-
Thanks for your help @Patskie..
But I don't think there's any changes in game because it's still the same.. No update on reward_codes.sql for redeem time, accound id and confirmed column.
Seems like all 3 problems I had above still occurs.
This is the previous script that I've used :promo_code_ori.txt
And this is yours : promo_code_patskie.txt
-
Nice little promotion script.
i have tested it. then a player can spam it!
Posted 28 March 2013 - 09:14 PM - no answer?
here's a little edit, i hope it's okay Arzzzae
ORIGINAL THREAD : http://goo.gl/e1LGXT
I'm using this script and maybe found some bugs.
1. No update on reward_codes.sql
but I think rewardlogs.sql just doing fine.
2. Referring to SS above, there are 2 codes has been given. But there's no update also when I use "View existing codes" in-game.
3.
After ADMIN use @code > setup the code > finish. He can't move, seems like stuck with npc. Need to @load or @go. I found no problems with @claim commands.
Note :
- I have restart the server after adding the script.
- I also has tried topic starter script and found all those bug mentioned by other members.
-
- script 1CastleDisable -1,{ OnPCLoadMapEvent: getmapxy(.@map$,.@mapx,.@mapy,0); if(.@map$ == "prtg_cas01"){ for(set .@i,0; .@i < getarraysize(.itemcheck); set .@i, .@i + 1){ if(countitem(.itemcheck[.@i])){ dispbottom "You cannot have any "+getitemname(.itemcheck[.@i])+" in your possession on this map."; warp "prontera",200,180; end; } } } end; OnInit: setarray .itemcheck[0],2383; end; } prtg_cas01 mapflag loadevent
This one is for not allowing players bring specific item to a map. Maybe other members can help restrict cards also.
-
prontera,175,148,3 script PointChecker 113,{ OnAtCommand: OnPCLoginEvent: dispbottom "You got "+#KAFRAPOINTS+" kafra points."; dispbottom "You got "+#CASHPOINTS+" cash points."; dispbottom "You got "+#VOTEFORPOINTS+" vote points."; end; OnInit: bindatcmd "kafrapoints",strnpcinfo(3)+"::OnAtCommand"; bindatcmd "cashpoints",strnpcinfo(3)+"::OnAtCommand"; bindatcmd "votepoints",strnpcinfo(3)+"::OnAtCommand"; end; }
Did this script is can be used sir..???
For me, to be easy, just use 1 command only to check all your points available.
Like this :
prontera,155,181,5 script Sample 757,{ OnAtCommand: OnPCLoginEvent: dispbottom "You got "+#CASHPOINTS+" cash points."; dispbottom "You got "+#VOTEFORPOINTS+" vote points."; dispbottom "You got "+#KAFRAPOINTS+" kafra points."; end; OnInit: bindatcmd "cashpoints",strnpcinfo(3)+"::OnAtCommand"; end; }
-
Use item_noequip.txt. Find it inside your db/pre-re or db/re
// The equipment/items/cards restriction file // here you define which items may not be used at PvP / GvG // format: <item id>,<mode> // mode // 1 - restricted in normal maps // 2 - restricted in PVP // 4 - restricted in GVG // 8 - restricted in Battlegrounds // Restricted zones - they're configured by 'restricted <number>' mapflag // 32 - restricted in zone 1 // 64 - restricted in zone 2 // 128 - restricted in zone 3 // 256 - restricted in zone 4 // 512 - restricted in zone 5 // 1024 - restricted in zone 6 // 2048 - restricted in zone 7 //Examples: //1201,1 you can't use KNIFE(ID 1201) on normal maps //608,4 you can't use Yggdrasil Seed(ID 608) on both GvG and WoE Castles //4174,6 Forbid Deviling Card in every PVP or GVG map, and during woes. //501,32 you can't use Red Potion on map marked as 'restricted zone 1' //502,64 you can't use Orange Potion on map marked as 'restricted zone 2' //503,128 you can't use Yellow Potion on map marked as 'restricted zone 3' // you can even mix modes //519,322 (256+64+2) you can't use Milk on PVP, and maps marked as 'restricted zone 2' and 'restricted zone 4'
-
The version you selected identifies with the mac address but you need Harmony in order to run it.
I see, but I don't have Harmony. Is there any possible way? Or you already did post the script?
-
- script dualclientkicker2 -1,{ OnPCLoginEvent: set .@len, query_sql("SELECT DISTINCT `account_id` FROM `char` WHERE `account_id` IN "+ "(SELECT `account_id` FROM `login` WHERE `last_mac` = "+ "(SELECT `last_mac` FROM `login` WHERE `account_id`="+getcharid(3)+")) AND `online` <> 0;",.@a); sleep2 1000; if(.@len>.max) atcommand "@kick "+strcharinfo(0); end; OnInit: set .max, 2; //Max Connections. }
Use whatever script you want mine worked when I tested it. -.-
@Skorm, this script will kick dual client only? Not same ip address (Cyber Cafe). I have used Universal V4 and it'll kick same ip address.
-
Any error? Post your script here.
- If you demand help for existing scripting code, you have to provide this scripting code in your topic.
- If
your map-server displays error messages concerning the problem you
have, you will have to provide these error messages in your topic. - You will have to use the code bbcode tag whenever you would like to post either scripting code or map-server error messages.
No need to be told, ask. Just follow the rules and make other members easier to help. No offense.
Utility : Promotional Code
in Utility Script Releases
Posted
Sorry for making this harder.. It's also hard for me to update new svn.. Thanks for your efforts..