-
Posts
102 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by Strand
-
Hello community, I'm creating a NPC that is able to detect a variable from a player but I want it to be able to show through a text and color whenever the player has completed a certain quest through detecting the number of the variable, for example: If the player has concluded satisfactorily the Attitude to the New World, for example: if ( newworld == 40 ) the text should be "Complete" and the color "Green" if not, it should remain Incomplete and color red. How can this be possible in a simple way? Thank you very much.
-
Thank You @Sehrentos You are my Savior.
-
Hello community, I have a problem when I want to create a script that updates the points of a character in SQL when he dies. I want him to lose 12 points when he dies, but if he dies with 2 points for example, the emulator shows an error in the following way: [SQL]: DB error - BIGINT UNSIGNED value is out of range in '(`myserver_ro`.`pvp_ranking`.`points` - 12)' [Debug]: at script.c:17014 - insert into `pvp_ranking` value ( 150040, 'Junior', 12 , 0 ) on duplicate key update `points` = `points` - 12 [Debug]: Source (NPC): PvPoints (invisible/not on a map) It would seem as if I could not do the subtraction of 2 - 12 and therefore give the number 0 as the final total since I believe it should be a "negative number". Anyone can help? Script: query_sql "insert into `pvp_ranking` value ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) ) +"', "+ .@points +" , 0 ) on duplicate key update `points` = `points` - "+ .@points +""; Thank you in advance.
-
Hello @Sehrentos Thank you very much for your help. It totally worked!
-
Hello @Sehrentos, Thank you for your time and help but I tried the first one with the arrays and the 2nd party member is not receiving the PvPKills Points in both cases (when enemy does not have the variable "last_kill" and when he does). Any idea what could be happening?
-
Hello @Sehrentos Sorry for being such a fool. I'm pretty bad with the arrays. Is there any way that you can edit my whole script with your suggestion, just to show the final outcome? If you were so kind... Thank you!!
-
Hello @Sehrentos Thank You for answering. How can i add it to my script? Can you help me with it? Where exactly do I add or edit addrid(2, 0, getcharid(1));?
-
Hello guys, I'm trying to build a PvP Ranking script that allows you to get kill points in Party mode and that all members get the corresponding points. I am also trying to make an exception where the Killer and Party Members can not get points from the opponent if he has already been killed once in the same round. Apparently I could achieve it, however, only applies to the person who kills the opponent. The members of the Party do not even receive points for the kill. It seems that the "last_kill" rule only applies to the Killer, not to the Party Members involved in the killing. Do you have any idea how to configure it to apply to all Party members? OnPCKillEvent: set .@killedvar,getvar(PvPAllowed,getcharid(0,rid2name(killedrid))); if(.@killedvar == 1 && PvPAllowed == 1){ set .@party_id,getcharid(1); if( !.@party_id ){ if ( getcharip(killedrid) == getcharip(getcharid(3)) ) { end; } // Can't obtain points if player has same IP if ( killedrid == last_kill ) { end; } // Can't get points if kill opponent twice in a row. set last_kill, killedrid; set PvPKills, PvPKills + 25; dispbottom "[ "+PvPKills+" ] PvPKills.", 0xF1948A; end; } }else{ getpartymember .@party_id,1; getpartymember .@party_id,2; set .@acc_id, getcharid(3); set .@map$,strcharinfo(3); for( set .@i, 0; .@i < $@partymembercount; set .@i, .@i +1 ) if( isloggedin( $@partymemberaid[.@i],$@partymembercid[.@i] ) ) if( attachrid( $@partymemberaid[.@i] ) ) if( HP && strcharinfo(3) == .@map$ ) set .@online_count,.@online_count + 1; for( set .@i, 0; .@i < $@partymembercount; set .@i, .@i +1 ) if( isloggedin( $@partymemberaid[.@i],$@partymembercid[.@i] ) ) if( attachrid( $@partymemberaid[.@i] ) ) if( HP && strcharinfo(3) == .@map$ ){ if ( getcharip(killedrid) == getcharip(getcharid(3)) ) { end; } // Can't obtain points if player has same IP if ( killedrid == last_kill ) { end; } // Can't get points if kill opponent twice in a row. set last_kill, killedrid; set PvPKills, PvPKills + 25; dispbottom "[ "+PvPKills+" ] PvPKills.", 0xF1948A; end; } attachrid( .@acc_id ); dispbottom "All your members have won PvP Kill Points."; }
-
Obtain Points Only if Killed Player has a Variable
Strand replied to Strand's question in Scripting Support
Thank you Sader. It totally worked. -
Obtain Points Only if Killed Player has a Variable
Strand replied to Strand's question in Scripting Support
Hello @sader1992, Well, the thing is that I want the script to give "God Points" only if both of the players have the variable "EnableGod" and its value is 1. For example: If my character has variable EnableGod == 1 (and the other player has it too), then if I get to kill the opponent I get 1 PvPkill. In another case, if I kill another opponent but he has EnableGoD == 0, then my kill won't count and I will not get the points. This is what I have made so far: OnPCKillEvent: set .@killedvar,getvar(EnableGod,killedrid); if ( killedrid != getcharid(3) && .@killedvar == 1 ) { set PvPkills, PvPkills+1; if (PvPkills == 1) goto L_PKGetFame; end; L_PKGetFame: dispbottom "You have won points."; dispbottom "God Point(s): "+PvPkills+"."; end; } end; But still does not work. -
Obtain Points Only if Killed Player has a Variable
Strand replied to Strand's question in Scripting Support
Hello sader1992. How do I exactly insert it on the script to make it work? I just tried but did not work properly. Thank you. -
Hello community, I'm working on a special PvP Script where a Player can obtain points only if the opponent has the same variable but I couldn't find anything accurate so far. I was wondering if you could give me a hand on this: OnPCKillEvent: if ( killedrid != getcharid(3) && EnableGod == 1 ) { set GodKills, GodKills+1; } end; It seems that it would just recognize my variable (as the Killer) but not for the opponent. If I set my variable 0, nothing would just happen. If I have the variable 1 I would get the points. But if the opponent has the variable 0 it would just give me the points anyway. Is there any special script to check the other player's variable? Thank you in advance.
-
Hello community, I have a question: Is there any way that I can enlarge the characters allowed on the item_db.txt? Beause I intend to give some bonuses to a player if he has different variables but for some reason when I put too many, the console shows me an error and does not recognize the item anymore. Is there any work around on this? For example, this is the code that I am working on. When the player is top 1, his bonuses will be doubled but since there are many words on the script the emulator just shows an error. 25439,Protector,Protector,4,0,,0,,0,,0,0xFFFFFFFF,63,2,8192,,1,0,1004,{ query_sql( "SELECT `points`, 1 + (SELECT COUNT(1) FROM `top_ranking` t1 WHERE t1.`points` > t2.`points`) FROM `top_ranking` t2 WHERE `char_id` = "+ getcharid(0), .@points, .@top); if (.@top == 1 && godtier >= 6) { bonus bAtkRate,10; bonus bMatkRate,10; bonus bMdefRate,10; bonus bDefRate,10; bonus bMaxHPrate,10; bonus bMaxSPrate,10; bonus bAllStats,10; } else if (.@top == 1 && godtier >= 5) { bonus bAtkRate,10; bonus bMatkRate,10; bonus bMdefRate,10; bonus bDefRate,10; bonus bMaxHPrate,10; bonus bMaxSPrate,10; } else if (.@top == 1 && godtier == 4) { bonus bAtkRate,10; bonus bMatkRate,10; bonus bMdefRate,10; bonus bDefRate,10; } else if (.@top == 1 && godtier == 3) { bonus bAtkRate,10; bonus bMatkRate,10; } else if ( godtier == 6 ) { bonus bAtkRate,3; bonus bMatkRate,3; bonus bMdefRate,3; bonus bDefRate,3; bonus bMaxHPrate,3; bonus bMaxSPrate,3; bonus bAllStats,5; } else if ( godtier == 5 ) { bonus bAtkRate,5; bonus bMatkRate,5; bonus bMdefRate,5; bonus bDefRate,5; bonus bMaxHPrate,5; bonus bMaxSPrate,5; } else if ( godtier == 4 ) { bonus bAtkRate,5; bonus bMatkRate,5; bonus bMdefRate,5; bonus bDefRate,5; } else if ( godtier == 3 ) { bonus bAtkRate,5; bonus bMatkRate,5; } },{},{} Do you think there is a way to make it shorter? Thank you.
-
Hello community, I have a question related to the Wings Animation when the wings are placed as a Robe(Garment), well, they just won't move at all just when the character walks or attacks but not when being static (Stand and Sit). The Wings Animation happens only if I placed them on Lower, Mid or Upper place but not as Robe. Is there any way that I can make the Wings have their animation when standing still (idle) as well?
-
Thank you very much Emistry. It totally worked. I'm sorry for the infraction. Will not happen again.
-
Hello @Capuche, Well, I already tried it but it is shown in another command. What I want to do now is to show anyone's Rank Position even if he is not on the Top 10. Do you think you can help me out? Thank you for taking your time to respond.
-
Hello guys, I kept on trying to get the desired result but no success so far... So sad...
-
Hello community, I've been trying to create or research a sql query to return a Player's Top Position Number through a command @LRank. I could have them listed by positions but I really do not know how to return the exact TOP # for the player when using the command even if he is not within the Top 10 Ranking. I was wondering if you could assist me by finding out the correct script to do it. Below is my script so far which is properly working at the moment: OnRank: dispbottom " "; dispbottom "=============== Ranking ===============", 0xffe066; soundeffect "hp.wav", 0; // this will play the soundeffect dispbottom " ", 0xFA4040; dispbottom " Top 10 List", 0xFA4040; dispbottom " ", 0xFA4040; set .@size, query_sql( "select name, points from mvp_ranking where points > 0 order by points desc limit "+ .top, .@name$, .@points ); for (set .@c, 0; .@c < .@size; set .@c, .@c + 1) dispbottom "[ " +(.@c + 1) +" ] : " + .@name$[.@c] +" : [ " + .@points[.@c] +" ] Pts", 0xffffff; dispbottom " ", 0xFA4040; *********** THIS IS THE PART THAT I'M STRUGGLING WITH *********** dispbottom "============== My Rank ==============", 0xffe066; query_sql "SELECT `char_id` , `points` FROM `mvp_ranking` ORDER BY `points` DESC",.@char_id,.@rank; dispbottom "My Top is: " + .@rank+ ".", 0x6666ff; dispbottom "==========================================", 0xffe066; end; I hope you can give me a hand on this. Thank you.
-
2015-11-04aRagexe_patched from Nemo not working
Strand replied to dwarf03's question in Client-side Support
If you can provide us more details may be I can be able to help because I just made this version to work for my server. -
Hello guys, I get an error when I try to fish anything: [Error]: script_rid2sd: fatal error ! player not attached! [Debug]: Function: emotion (1 parameter): [Debug]: Data: variable name='ET_THINK' index=0 [Debug]: Source (NPC): Test Spot at izlude (127,60) [Warning]: script:get_val: cannot access player variable 'ET_THINK', defaulting to 0 Any ideas why is it showing up and how to fix it? Thanks for your time.
-
Hello @Capuche Thanks for responding. It did not work either way. I believe the main resides here: But I do not know where to start. The script is just considering the first item drop chance. It is just ignoring the other 9 items with their respective drop chance. This is the full script: https://github.com/Stolao/Npc_Release/blob/master/Mining/Mining.txt
-
Hello TheDerpySupport, I already tried by replying to the same topic aswell, but nobody answers.
-
Hello community! I just tried the Stolao´s Mining script for my server but I having an issue with the drop of every Deposit. The function contains the following structure: The red color represents the ItemID and the green color represents the DropChance as far as the script establishes it: The problem is, when I try to increase the drop chance of the second item and kill the Jellopy Deposit it just will drop the first item. Even if I swap the drop chance values making the second item have the highest drop chance. Happens the same if I add high chance values to the rest of the items. It will only recognize the first item of the row. Any ideas on what can I possibly do to make it work? Thank you.
-
Stolao's Mining [4.4B] -Unsupported, Bug Fixes Only-
Strand replied to Stolao's topic in Utility Script Releases
Hello, How does the re spawning work? Does the Iron, Master, etc... Deposits have a specific time to respawn on the same map? or how does it work? Thanks. Hello again, another question: When I try to change the dropping item at the very end of the Jellopy Deposit "7126,625" to "7126,10000" to make it 100% droppable it won´t just work. OnMineJell: MiningSpawn(1,0); MiningFunc(0,0,.Pick[0],5,100,rand(1,2),7049,5000,909,2500,909,1250,909,625,909,625,909,625,909,625,909,625,909,625,7126,625); end; to: OnMineJell: MiningSpawn(1,0); MiningFunc(0,0,.Pick[0],5,100,rand(1,2),7049,5000,909,2500,909,1250,909,625,909,625,909,625,909,625,909,625,909,625,7126,10000); end; Even if I change any other item drop it will only consider the first one of the script which is "7049,5000". Any ideas how to fix it? Thanks for your time. Hello everybody. Does anybody may have an answer to my questions? I´d be more than glad if you could help me out with this. Thanks!