mrlongshen 22 Posted July 2, 2015 Hello. Is that possible to make this in one script ? I want player get 1 cash point every times mvp killed and also pvping. For mvp, lets announce to all map after the mob killed. Quote Share this post Link to post Share on other sites
0 Dastgir 1246 Posted July 3, 2015 @@Winterfox @@Dastgir http://herc.ws/board/topic/10048-r-pvp-mvp-cash-point-on-killed/#entry59302 any solution ? mobRewardPoints to.mobRewardPoints 1 mrlongshen reacted to this Quote Share this post Link to post Share on other sites
0 Winterfox 83 Posted July 2, 2015 (edited) http://pastebin.com/j2LfhEwV You have to change the .@mobIds array to the ids of the mobs you want to give rewards for, in your case the MVPs. I am sorry for this inconvinience but i couldn't find a solution that can tell if a certain mob id is a mvp. :/ To adjust the amounts of cash points the player gets you can use .mobRewardPoints and pvpRewardPoints, just change it to your needs. The MVP one will announce it on all maps, the pvp on only on the according map. Edited July 2, 2015 by Winterfox 1 mrlongshen reacted to this Quote Share this post Link to post Share on other sites
0 mrlongshen 22 Posted July 2, 2015 (edited) @@Winterfox like this ? .rewardMobIds[1649] = 1; //High Priest Magaleta / High Priest Margaretha .rewardMobIds[1651] = 1; //High Wizard Katrinn / High Wizard Kathryne .rewardMobIds[1646] = 1; //Lord Knight Seyren [Error]: script error in file '(DIRECT INPUT)' line 19 column 203 parse_callfunc: not enough arguments, expected ',' 16: OnPCKillEvent: 17: #CASHPOINTS += .pvpRewardPoints; 18: dispbottom "You now have " + #CASHPOINTS + " Cash Point" + ((#CASHPOINTS > 1)? "s":"") + "."; * 19: mapannounce strcharinfo(PC_MAP), strcharinfo(PC_NAME) + " killed " + rid2name(killedrid) + " and earned "+ pvpRewardPoints +" Cash Point" + ((.pvpRewardPoints > 1)? "s":"") + "."; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 20: end; 21: } I got this problem too Edited July 2, 2015 by mrlongshen Quote Share this post Link to post Share on other sites
0 Dastgir 1246 Posted July 2, 2015 mapannounce strcharinfo(PC_MAP), strcharinfo(PC_NAME) + " killed " + rid2name(killedrid) + " and earned " + .pvpRewardPoints +" Cash Point" + ((.pvpRewardPoints > 1)? "s" : "") + "."; To mapannounce strcharinfo(PC_MAP), strcharinfo(PC_NAME) + " killed " + rid2name(killedrid) + " and earned " + .pvpRewardPoints +" Cash Point" + ((.pvpRewardPoints > 1)? "s" : "") + ".",bc_map; 1 mrlongshen reacted to this Quote Share this post Link to post Share on other sites
0 mrlongshen 22 Posted July 2, 2015 (edited) @@Dastgir thanks alot. by the way I got this problem. Every times annoucement, its show 0 point, not the value Im setitng. But on disbottom is correct. announce strcharinfo(PC_NAME) + " killed " + strmobinfo(1, killedrid) + " and earned "+ mobRewardPoints +" Cash Point" + ((.mobRewardPoints > 1)? "s":"") + ".", bc_all; Edited July 3, 2015 by mrlongshen Quote Share this post Link to post Share on other sites
0 Winterfox 83 Posted July 3, 2015 (edited) I still had a typo in this one. Check this version out: http://pastebin.com/BU4kry6p It automatically adds the MVPs now. .@mobIdListStr$ can be used to add custom monsters etc. .@mobFilterListStr$ can be used to exclude monsters. The syntax for both is like this.@mobIdListStr$ = "ID, ID, ID". Make sure to insert the space after every comma or it won't work properly. The other two variables stayed the same. Edited July 3, 2015 by Winterfox Quote Share this post Link to post Share on other sites
0 Dastgir 1246 Posted July 3, 2015 @@Winterfox You can't direct cast string to int. E.g .@mobIds[.@i] = .@mobIdList$[.@i]; Should be .@mobIds[.@i] = atoi(.@mobIdList$[.@i]); (There's other place too, which needs to be changed) Quote Share this post Link to post Share on other sites
0 Winterfox 83 Posted July 3, 2015 (edited) @@Dastgir I see thanks for the info. I thought it would work like that since the server didn't output a message if i directly tried to cast it like that and put it as array key afterwards. May i ask you something else too? I use the IDs of the mobs as array keys to have not have to loop trough the whole list when i want to find out if a certain mob is part of it. But i noticed that hercules seems to create as much elements as the biggest key i use, so i was wondering if it is a good idea to do it like that or if it is just better to use loops instead or if there is a way to prevent hercules from creating all this overhead elements. Nevermind, i didn't read the doc properly that getarraysize returns the biggest index and not the real count of items. Edited July 3, 2015 by Winterfox Quote Share this post Link to post Share on other sites
0 mrlongshen 22 Posted July 3, 2015 @@Winterfox @@Dastgir http://herc.ws/board/topic/10048-r-pvp-mvp-cash-point-on-killed/#entry59302 any solution ? Quote Share this post Link to post Share on other sites
0 Winterfox 83 Posted July 3, 2015 (edited) @@mrlongshen Didn't you see my last post? In http://pastebin.com/BU4kry6p this error shouldn't be there. Edited July 3, 2015 by Winterfox 1 mrlongshen reacted to this Quote Share this post Link to post Share on other sites
0 mrlongshen 22 Posted July 3, 2015 @Dastgir @Winterfox Thanks alot. By the way I prefer the 1st one. hehe Quote Share this post Link to post Share on other sites
0 mrlongshen 22 Posted July 7, 2015 @@mrlongshen Didn't you see my last post? In http://pastebin.com/BU4kry6p this error shouldn't be there. @@Winterfox this script dont need to edit MVP id ? its detect automatically right ? but I can add manually mob id on .@mobIdListStr$ = ""; Right ? Quote Share this post Link to post Share on other sites
0 Winterfox 83 Posted July 7, 2015 @@mrlongshen Exactly, you just need to separate them by a comma and a space. Quote Share this post Link to post Share on other sites
0 mrlongshen 22 Posted July 7, 2015 @@Winterfox ok thanks alot. Just need confirmation hehe Quote Share this post Link to post Share on other sites
Hello.
Is that possible to make this in one script ?
I want player get 1 cash point every times mvp killed and also pvping.
For mvp, lets announce to all map after the mob killed.
Share this post
Link to post
Share on other sites