-
Posts
633 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by JayPee
-
if it is an addon you just put it in the addons folder. If the schemas or database tables fluxcp will do an installation Edit: Nevermind this I think Im in not myself this time.
-
I really cannot reproduce the error. By the way what fluxcp are you using?
-
is that v4p for fluxCP?
-
kindly check addons/cms/modules/news/view.php and addons/cms/themes/default/news/view.php if both files exist Is your fluxCP can be visited online?
-
is your fluxcp online, i mean can be visited?
-
so I guess this is source modification? there will be an npc where the gm will be going to pm?
-
cp - is the folder of where you put the control panel? ?module=news&action=view - it is somewhat an address which means in index.php it will load the view.php which in news modules.
-
-
How can you make the Russian Roullete just 1 time?
JayPee replied to Yummy's question in Scripting Support
Question: After the player win, the player cannot play forever? if yes: Try This: //===== eAthena Script ======================================= //= Rock Scissors Roulette Script //===== By: ================================================== //= acky (1.1) //===== Current Version: ===================================== //= 1.2 //===== Compatible With: ===================================== //= Any eAthena Version //===== Description: ========================================= //= Plays a hybrid Russian Roulette Rock Scissors Paper game. //===== Additional Comments: ================================= //= Prizes customisable, Added emotions. //= 1.2 Fixes by Blackthunder and me [Poki#3] //============================================================ cmd_in02,182,126,2 script Crazy Boris 85,{ if(#already_played==1) goto ALREADY_PLAYED; mes "Crazy Boris"; set @counter,1; mes "Hey you! Up for Rock Scissors Roulette?"; next; menu "Let me play.",PLAY,"Explain the rules.",RULES,"Leave",LEAVE; SAME: mes "Draw! Again!"; next; goto PLAY; WIN: mes "Damnit, You Win!"; emotion 19; next; goto OPPPULL; LOSE: emotion 18; mes "Boorah! You Lose!"; next; goto YOUPULL; PLAY: mes "Rock... Paper..."; set @opp,rand (1,3); menu "^0000FFROCK!",ROCK,"^FF0000SCISSORS!",SCISSORS,"^00FF00PAPER!^000000",PAPER; ROCK: if (@lastchoice == 1) set @opp,rand (1,3); if (@opp == 1) emotion 11; if (@opp == 2) emotion 10; if (@opp == 3) emotion 12; set @lastchoice,1; if (@opp == 1) goto SAME; if (@opp == 2) goto WIN; if (@opp == 3) goto LOSE; SCISSORS: if (@lastchoice == 2) set @opp,rand (1,2); if (@opp == 1) emotion 11; if (@opp == 2) emotion 10; if (@opp == 3) emotion 12; set @lastchoice,2; if (@opp == 1) goto LOSE; if (@opp == 2) goto SAME; if (@opp == 3) goto WIN; PAPER: if (@lastchoice == 3) set @opp,rand (2,3); if (@opp == 1) emotion 11; if (@opp == 2) emotion 10; if (@opp == 3) emotion 12; set @lastchoice,3; if (@opp == 1) goto WIN; if (@opp == 2) goto LOSE; if (@opp == 3) goto SAME; YOUPULL: if (@counter == 1) goto ONE; if (@counter == 2) goto TWO; if (@counter == 3) goto THREE; if (@counter == 4) goto FOUR; if (@counter == 5) goto FIVE; if (@counter == 6) goto SIX; OPPPULL: if (@counter == 1) goto ONEa; if (@counter == 2) goto TWOa; if (@counter == 3) goto THREEa; if (@counter == 4) goto FOURa; if (@counter == 5) goto FIVEa; if (@counter == 6) goto SIXa; ONE: set @counter,2; mes "1 of 6"; set @pull,rand (1,6); next; if (@pull == 1) goto DIE; if (@pull != 1) goto SAFE; TWO: set @counter,3; mes "2 of 6"; set @pull,rand (1,5); next; if (@pull == 1) goto DIE; if (@pull != 1) goto SAFE; THREE: set @counter,4; mes "3 of 6"; set @pull,rand (1,4); next; if (@pull == 1) goto DIE; if (@pull != 1) goto SAFE; FOUR: set @counter,5; mes "4 of 6"; set @pull,rand (1,3); next; if (@pull == 1) goto DIE; if (@pull != 1) goto SAFE; FIVE: set @counter,6; mes "5 of 6"; set @pull,rand (1,2); if (@pull == 1) set @pull,rand (1,2); next; if (@pull == 1) goto DIE; if (@pull != 1) goto SAFE; SIX: mes "6 of 6"; mes "Say your prayers"; set @pull,1; next; if (@pull == 1) goto DIE; if (@pull != 1) goto SAFE; ONEa: set @counter,2; mes "1 of 6"; set @pull,rand (1,6); next; if (@pull == 1) goto KILL; if (@pull != 1) goto SAFE; TWOa: set @counter,3; mes "2 of 6"; set @pull,rand (1,5); next; if (@pull == 1) goto KILL; if (@pull != 1) goto SAFE; THREEa: set @counter,4; mes "3 of 6"; set @pull,rand (1,4); next; if (@pull == 1) goto KILL; if (@pull != 1) goto SAFE; FOURa: set @counter,5; mes "4 of 6"; set @pull,rand (1,3); next; if (@pull == 1) goto KILL; if (@pull != 1) goto SAFE; FIVEa: set @counter,6; mes "5 of 6"; set @pull,rand (1,2); next; if (@pull == 1) goto KILL; if (@pull != 1) goto SAFE; SIXa: mes "6 of 6"; mes "Say your prayers"; set @pull,1; next; if (@pull == 1) goto KILL; if (@pull != 1) goto SAFE; SAFE: emotion 32; mes "*^0000FFClick^000000* whew..."; goto PLAY; DIE: specialeffect2 183; emotion 29; percentheal -100,-100; mes "*^0000FFClick^000000* *^FF0000BANG^000000*"; mes "You're dead!"; close; KILL: specialeffect 183; emotion 23; mes "*^0000FFClick^000000* *^FF0000BANG^000000*"; mes "OWWW @#$%^!! THAT HURT LIKE HELL!!"; next; goto PRIZE; RULES: mes "Ok here are the rules:"; mes "I have with me a ^FF00006^000000 chamber pistol with ^FF00001^000000 round. First we play ^FF0000Scissors ^00FF00Paper ^0000FFRock^000000. The loser pulls the trigger. The winner is whoever comes out best."; mes "Beat me to win a prize."; menu "Let me play.",CONT,"No thanks.",LEAVE; CONT: mes "Ok here we go..."; next; goto PLAY; PRIZE: mes "Congratulations! You have won..."; set #already_played,1; set @prize,rand (1,10); if (@prize == 1) goto P1; if (@prize == 2) goto P2; if (@prize == 3) goto P3; if (@prize == 4) goto P4; if (@prize == 5) goto P5; if (@prize == 6) goto P6; if (@prize == 7) goto P7; if (@prize == 8) goto P8; if (@prize == 9) goto P9; if (@prize == 10) goto P10; P1: mes "10x Oridicon!"; getitem 984,10; close; P2: mes "10x Elunium!"; getitem 985,10; close; P3: mes "100x Fly Wings!"; getitem 601,100; close; P4: mes "8x Old Blue Box!"; getitem 603,8; close; P5: mes "4x Old Violet Box!"; getitem 617,4; close; P6: mes "1x Old Card Album!"; getitem 616,1; close; P7: mes "10x Dead Branch!"; getitem 604,10; close; P8: mes "3x Gold!"; getitem 969,3; close; P9: mes "10x Elunium!"; getitem 985,10; close; P10: mes "20x Blue Potion!"; getitem 505,20; close; LEAVE: mes "Pansy."; close; ALREADY_PLAYED: mes "You cannot play this game ever again."; close; } -
try mo mag @agitstart and @agitend then tingnan mo ung mapserver mo kung may nairereport na error. Another question gumagamit ka ba ng WoE Controller Scripts like Toasty WoE Controller?
-
did you try this script command?:
-
You can use a timer and store the starting positions of each player inside the map in a npc variable let say that you will check the players position every 5 seconds since you have stored the positions of the player in a variable, you will check if the recorded/stored position of this player is equal to the new/current position this player,if equal the player is AFK then warp it out else record or store the new/current position of the player check again in the next 5 seconds until the match end.
-
mob_db script, i need your "Common Sense"
JayPee replied to budabeads's topic in Tulong para sa Script at Database
anu nirereport ng map server mo kapag inaunequip mo ung item? -
can you post your script?
-
-
Hi, my bad I forgot to put a validation for null value i thought pre_reg(); will be able to detect it. Kindly read again the module, lib and lib folder
-
base on my understanding in the regular expression it allows YYYY-MM-DD and YYYY/MM/DD. It works fine on my FluxCP
-
I tested it in my FluxCP and it works fine. Does it report any error? Edit: Sorry I forgot to include another step in the modules part. Please read again the modules folder part.
-
Count me in. Question, where I can download the latest ceres?
-
I think its pc_isGM(sd); it was replaced by pc_get_group_level(sd)
-
File Name: FluxCP Addson: Server Online Users Highest Peak File Submitter: JayPee File Submitted: 17 Mar 2012 File Category: Web Resources This allow you to view the Server Online Users Highest Peak in your Server. The addons uses a script which records and determines the Server Online Users Highest Peak. Note: If the FluxCP Installation doesnt kindly import the cp_highest_peak table in your database manually. The .sql file can be found at the schemas folder. Click here to download this file
-
Here, this is a addson and also the script is inside. The script will be use to get the current user in your server and this check your server highest peak while the fluxcp addons will display the server highest peak on your site. 1.) Put this in your addson folder: highest_peak.rar If the FluxCP Installation for the cp_highest_peak table doesnt show kindly import it manually in your database. After you finish putting all the files you may visit this page: http://youraddress/y...le=highest_peak
-
What control panel do you use?
-
Here is the solution: themes Folder 1.) edit themes/THETHEMEYOUAREUSING/account/create.php Now search: <t <th><label for="register_email_address"><?php echo htmlspecialchars(Flux::message('AccountEmailLabel')) ?></label></th> <td><input type="text" name="email_address" id="register_email_address" value="<?php echo htmlspecialchars($params->get('email_address')) ?>" /></td> </t then add this below <t <th><label for="register_birth_date"><?php echo htmlspecialchars(Flux::message('BirthDateLabel')) ?></label></th> <td><input type="text" name="birth_date" id="register_birth_date" value="<?php echo htmlspecialchars($params->get('birth_date')) ?>" /><i>(Format: YYYY-MM-DD)</i></td> </t Result looks like this: <t <th><label for="register_email_address"><?php echo htmlspecialchars(Flux::message('AccountEmailLabel')) ?></label></th> <td><input type="text" name="email_address" id="register_email_address" value="<?php echo htmlspecialchars($params->get('email_address')) ?>" /></td> </t <t <th><label for="register_birth_date"><?php echo htmlspecialchars(Flux::message('BirthDateLabel')) ?></label></th> <td><input type="text" name="birth_date" id="register_birth_date" value="<?php echo htmlspecialchars($params->get('birth_date')) ?>" /><i>(Format: YYYY/MM/DD)</i></td> </t We are now done with the themes part. modules folder edit modules/account/create.php Now find this: $code = $params->get('security_code'); then add below $birthdate = $params->get('birth_date'); Result looks like this: $code = $params->get('security_code'); $birthdate = $params->get('birth_date'); And find also this: case Flux_RegisterError::INVALID_SECURITY_CODE: $errorMessage = Flux::message('InvalidSecurityCode'); break; then add this below case Flux_RegisterError::INVALID_BIRTHDATE_FORMAT: $errorMessage = Flux::message('BirthDateError'); break; case Flux_RegisterError::BIRTHDATE_MUSTNOTBE_EMPTY: $errorMessage = Flux::message('BirthDateEmptyError'); break; Result looks like this: case Flux_RegisterError::INVALID_SECURITY_CODE: $errorMessage = Flux::message('InvalidSecurityCode'); break; case Flux_RegisterError::INVALID_BIRTHDATE_FORMAT: $errorMessage = Flux::message('BirthDateError'); break; case Flux_RegisterError::BIRTHDATE_MUSTNOTBE_EMPTY: $errorMessage = Flux::message('BirthDateEmptyError'); break; Find: // Woohoo! Register $result = $server->loginServer->register($username, $password, $confirm, $email, $gender, $code); Replace it with this: $result = $server->loginServer->register($username, $password, $confirm, $email, $gender, $code, $birthdate); Result looks like this: // Woohoo! Register $result = $server->loginServer->register($username, $password, $confirm, $email, $gender, $code, $birthdate); lang folder edit lang/en_us.php or which language you use Now find: 'WoeNotScheduledInfo' => 'There are no scheduled WoE hours.', then add this below: 'BirthDateLabel' => 'Enter your Birthdate:', 'BirthDateError' => 'Format for Birthdate is YYYY-MM-DD', 'BirthDateEmptyError' => 'Birthdate field must not be empty, Format for Birthdate is YYYY-MM-DD', Result looks like this 'WoeNotScheduledInfo' => 'There are no scheduled WoE hours.', 'BirthDateLabel' => 'Enter your Birthdate:', 'BirthDateError' => 'Format for Birthdate is YYYY-MM-DD', 'BirthDateEmptyError' => 'Birthdate field must not be empty, Format for Birthdate is YYYY-MM-DD', lib folder 1.) edit lib/Flux/RegisterError.php Find: const INVALID_SECURITY_CODE = 10; then add below const INVALID_BIRTHDATE_FORMAT = 11; const BIRTHDATE_MUSTNOTBE_EMPTY = 12; Result looks like this: const INVALID_SECURITY_CODE = 10; const INVALID_BIRTHDATE_FORMAT = 11; const BIRTHDATE_MUSTNOTBE_EMPTY = 12; 2.) edit lib/Flux/LoginServer.php Find: public function register($username, $password, $confirmPassword, $email, $gender, $securityCode) replace it with this: public function register($username, $password, $confirmPassword, $email, $gender, $securityCode,$birthdate) Inside the function find: elseif ($password !== $confirmPassword) { throw new Flux_RegisterError('Passwords do not match', Flux_RegisterError::PASSWORD_MISMATCH); } then add below: elseif (!preg_match('#^((19|20)?[0-9]{2}[- /.](0?[1-9]|1[012])[- /.](0?[1-9]|[12][0-9]|3[01]))*$#', $birthdate)) { throw new Flux_RegisterError('Birthdate must be YYYY-MM-DD', Flux_RegisterError::INVALID_BIRTHDATE_FORMAT); } elseif (empty($birthdate)) { throw new Flux_RegisterError('Birthdate field must not be empty', Flux_RegisterError::BIRTHDATE_MUSTNOTBE_EMPTY); } We're still inside the function Note: This is for those who are using 'level' column name in your login table Find: $sql = "INSERT INTO {$this->loginDatabase}.login (userid, user_pass, email, sex, level) VALUES (?, ?, ?, ?, ?)"; then replace it with this: $sql = "INSERT INTO {$this->loginDatabase}.login (userid, user_pass, email, sex, level, birthdate) VALUES (?, ?, ?, ?, ?, ?)"; Note: This is for those who are using 'group_id' column name in your login table Find: $sql = "INSERT INTO {$this->loginDatabase}.login (userid, user_pass, email, sex, group_id) VALUES (?, ?, ?, ?, ?)"; then replace it with this: $sql = "INSERT INTO {$this->loginDatabase}.login (userid, user_pass, email, sex, group_id, birthdate) VALUES (?, ?, ?, ?, ?, ?)"; Find: $res = $sth->execute(array($username, $password, $email, $gender, (int)$this->config->getLevel())); then replace it with this: $res = $sth->execute(array($username, $password, $email, $gender, (int)$this->config->getLevel(),$birthdate)); Now try to register
-
Script Name: strDivide Description: Allows you to divide two integers. It returns a floating value. Note: the floating value is in string datatype. Version: 1.1 - added division of negative numbers and some variable cleanups Parameters(should be in order): dividend - this should be a number not a string divisor - this should be a number not a string number of decimal digits. Note: You must have this source modification http://rathena.org/board/topic/60307-additional-script-command-for-math-function-absx/page__pid__85826#entry85826. Since absolute script command is not yet added in rathena SVN. function script strDivide { //.@dividend - dividend //.@divisor - divisor //getarg(2) - decimal digits //return values: //Undefined if the divisor is 0 //0 if the dividend is 0 set .@dividend,getarg(0); set .@divisor,getarg(1); if(getarg(2)==0) set .@limit,2; else set .@limit,getarg(2); //Prefix set .@prefix$,""; if(.@dividend<0) { set .@dividend,abs(getarg(0)); if(.@prefix$=="-") set .@prefix$,""; else set .@prefix$,"-"; } if(.@divisor<0) { set .@divisor,abs(getarg(1)); if(.@prefix$=="-") set .@prefix$,""; else set .@prefix$,"-"; } if(.@dividend==.@divisor) { set .@str_decimals$,""; for(set .@i,0; .@i<.@limit; set .@i,.@i+1) { set .@str_decimals$,.@str_decimals$+"0"; } set .@str_result$,"1."+.@str_decimals$; } else if(.@divisor==0) return "Undefined"; else if(.@dividend==0) { set .@str_decimals$,""; for(set .@i,0; .@i<.@limit; set .@i,.@i+1) { set .@str_decimals$,.@str_decimals$+"0"; } set .@str_result$,"0."+.@str_decimals$; } else { if(.@dividend>.@divisor) { set .@tmp_Counter,0; //Counter set .@result,0; //Reset value to zero set .@result,.@dividend; //ex 10(dividend) - 3(divisor) = 7(result) do { if((.@result-.@divisor)>=0) { set .@result,.@result-.@divisor; set .@tmp_Counter,.@tmp_Counter+1; } else break; }while(.@result>0); set .@str_result$,""; set .@str_result$,.@str_result$+""+.@tmp_Counter; if(.@result >= 1) { //If the remainder is greater or equal to 1 set .@start,0; //Start indicator set .@str_decimals$,""; //temporary holder of the decimal values while(.@start < .@limit) { set .@tmp_Counter,0; //Counter set .@result,.@result*10; //Remainder(.@result) * 10 do { if((.@result-.@divisor)>=0) { set .@result,.@result-.@divisor; set .@tmp_Counter,.@tmp_Counter+1; } else break; }while(.@result>0); //Append the decimal set .@str_decimals$,.@str_decimals$+""+.@tmp_Counter; //If there is a remainder check the limit of decimal digit //else break the result if(.@result>=1) set .@start,.@start+1; else break; } if(getstrlen(.@str_decimals$)>=.@limit) set .@str_decimals$,substr(.@str_decimals$,0,.@limit-1); else { for(set .@i,getstrlen(.@str_decimals$); .@i<.@limit; set .@i,.@i+1) { set .@str_decimals$,.@str_decimals$+"0"; } } set .@str_result$,.@str_result$+"."+.@str_decimals$; } else { //If the remainder is equal to zero nothing to loop set .@str_decimals$,""; for(set .@i,0; .@i<.@limit; set .@i,.@i+1) { set .@str_decimals$,.@str_decimals$+"0"; } set .@str_result$,.@str_result$+"."+.@str_decimals$; } } else { //The divisor is greater than the dividend set .@str_result$,"0"; set .@str_decimals$,""; //Multiply the .@dividend to ten, hundred, thousand set .@tmp_multi,1; set .@start,0; do { set .@result,(.@dividend)*(pow(10,.@tmp_multi)); if(.@result<.@divisor) set .@str_decimals$,.@str_decimals$+"0"; set .@tmp_multi,.@tmp_multi+1; }while(.@result<=.@divisor); if(.@result==.@divisor) set .@str_decimals$,"1"; else if(.@result>.@divisor) { while(.@start<.@limit) { set .@tmp_Counter,0; do { if((.@result-.@divisor)>=0) { set .@result,.@result-.@divisor; set .@tmp_Counter,.@tmp_Counter+1; } else break; }while(.@result>0); if(.@result>0){ set .@str_decimals$,.@str_decimals$+""+.@tmp_Counter; set .@tmp_multi,1; do { set .@result,(.@result)*(pow(10,.@tmp_multi)); if(.@result<.@divisor) set .@str_decimals$,.@str_decimals$+"0"; set .@tmp_multi,.@tmp_multi+1; }while(.@result<.@divisor); } else { set .@str_decimals$,.@str_decimals$+""+.@tmp_Counter; break; } set .@start,.@start+1; } } if(getstrlen(.@str_decimals$)>=.@limit) set .@str_decimals$,substr(.@str_decimals$,0,.@limit-1); else { for(set .@i,getstrlen(.@str_decimals$); .@i<.@limit; set .@i,.@i+1) { set .@str_decimals$,.@str_decimals$+"0"; } } set .@str_result$,"0."+.@str_decimals$; } } return .@prefix$+""+.@str_result$; }