Jump to content

Search the Community

Showing results for tags 'points'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • RuneLocus
    • News & Announcements
    • Information Booth
    • Website Support
    • Introductions
    • Chat
    • Forum Games
  • RuneScape Development
    • RSPS General
    • RuneScape Private Server (RS2)
    • RuneScape Private Server (503+)
    • RuneScape Private Server (EoC 742+)
  • Other
    • Digital Art
    • Gaming
    • Webdevelopment
    • Computers
  • Marketplace
    • RuneScape Market
    • RSPS Market
    • Others Market
    • Freelance Middleman Services
  • Super Secret Club's Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 46 results

  1. When i tried to add Donor points shop I got these errors on compiler [url]http://prntscr.com/55qzjf[/url] How do i fix them?
  2. Hey, In this tutorial we're going to be: [LIST] [*]Adding PK Points (so they save) [*]Making it so when a player kills someone they obtain PK Points [*]A few examples on how you can add more point systems to your server. [/LIST] Alright, so first off we're going to make PKP Save on the characters file, so what we're going to want to do is go into our servers folder and edit the PlayerSave.java file (Server.Model.Players). Now we're going to press CTRL + F to search the document for this line: [CODE]} else if (token.equals("magic-book")) {[/CODE] underneath [CODE]} else if (token.equals("magic-book")) { [COLOR="#FF0000"]p.playerMagicBook = Integer.parseInt(token2);[/COLOR][/CODE] We're going to add: [CODE]} else if (token.equals("pk-points")) { p.pkPoints= Integer.parseInt(token2);[/CODE] Your code should now look like: [CODE]} else if (token.equals("magic-book")) { p.playerMagicBook = Integer.parseInt(token2); } else if (token.equals("pk-points")) { p.pkPoints= Integer.parseInt(token2);[/CODE] What we've just added is the loading for PK Points, so PKPoints is our integer that's automatically set to 0 when we create a new account (as you will see on step 3), what this does is makes the server know that PkPoints loads as PK-points. Step 2) in the same file search for [CODE]characterfile.write("teleblock-length = ", 0, 19);[/CODE] the same way we did as before (CTRL+F), you should see: [CODE]characterfile.write("teleblock-length = ", 0, 19); characterfile.write(Integer.toString(tbTime), 0, Integer.toString(tbTime).length()); characterfile.newLine();[/CODE] Underneath [CODE][COLOR="#FF0000"]characterfile.newLine();[/COLOR][/CODE] we're going to add: [CODE]characterfile.write("pk-points = ", 0, 12); characterfile.write(Integer.toString(p.pkPoints), 0, Integer.toString(p.pkPoints).length()); characterfile.newLine();[/CODE] Your code should now look like: [CODE]characterfile.write("teleblock-length = ", 0, 19); characterfile.write(Integer.toString(tbTime), 0, Integer.toString(tbTime).length()); characterfile.newLine(); characterfile.write("pk-points = ", 0, 12); characterfile.write(Integer.toString(p.PkPoints), 0, Integer.toString(p.PkPoints).length()); characterfile.newLine();[/CODE] What we've just added is saving our Pk Points, what [COLOR="#FF0000"]characterfile.newLine();[/COLOR] what this does is moves the save down to the next line, without this our teleblock timer (example was set to 60 for one second) and we had 40 PK Points would look like this 6040 (that's in seconds). [CODE]characterfile.write("pk-points = ", 0, [COLOR="#FF0000"]12[/COLOR]);[/CODE] the 12 is essential if it's anymore or any less it will crash your server as this tells the server which character slot it saves it in, [CODE]pk-points = [/CODE] is 12 characters in lenght (including the - and spaces). Now, we're going to save this by either doing it normally or pressing CTRL + S to save the file (I'm telling you this incase you're unaware, this also improves efficiency). We're going to open Player.java located in the same area as PlayerSave.java. Press CTRL+F and look for [CODE]pcPoints,[/CODE] after the comma add [CODE] pkPoints,[/CODE] our code should now look like this: [CODE]pcPoints, pkPoints,[/CODE], press CTRL+F now we're all done for PK Points (saving and loading) Adding PkP when killing an player, open PlayerAssistant.java and search for: [CODE]o.sendMessage("You have defeated " + c.playerName + "!");[/CODE] Under that code add: [CODE]o.PkPoints++;[/CODE] Our code should now look like: [CODE]o.sendMessage("You have defeated " + c.playerName + "!"); o.PkPoints++;[/CODE] Save and Compile, you've sucessfully added basic PK Points, I will write a tutorial in the future on how to prevent PKP Boosting.
  3. I need to know how to add 'Donator Points = ' into the quest tab so it allows people to check how many donator points they have in game?
  4. Hi guys, I'm using Trisidiax v3 source and the prayer points are always at max, I active many prayers, (they work) but the prayer points are always at max. How could I fix that? double[] prayerData = { 1, // Thick Skin. 1, // Burst of Strength. 1, // Clarity of Thought. 1, // Sharp Eye. 1, // Mystic Will. 2, // Rock Skin. 2, // SuperHuman Strength. 2, // Improved Reflexes. 0.4, // Rapid restore. 0.6, // Rapid Heal. 0.6, // Protect Items. 1.5, // Hawk eye. 2, // Mystic Lore. 3, // Steel Skin. 3, // Ultimate Strength. 3, // Incredible Reflexes. 3, // Protect from Magic. 3, // Protect from Missiles. 3, // Protect from Melee. 3, // Eagle Eye. 3, // Mystic Might. 1, // Retribution. 2, // Redemption. 5, // Smite. 6, // Chivalry. 6, // Piety. }; double[] curseData = { 0.6, // Protect Item 3, // Sap Warrior 3, // Sap Range 3, // Sap Mage 3, // Sap Spirit 2, // Berserker 3, // Deflect Summoning 3, // Deflect Mage 3, // Deflect Range 3, // Deflect Melee 3, // Leech Attack 3, // Leech Range 3, // Leech Mage 3, // Leech Defence 3, // Leech Strength 3, // Leech Energy 3, // Leech Special 3, // Wrath 5, // Soul Split 6, // Turmoil }; public void handlePrayerDrain() { c.usingPrayer = false; double toRemove = 0.0; for (int j = 0; j < prayerData.length; j++) { if (c.prayerActive[j]) { toRemove += prayerData[j]/20; c.usingPrayer = true; } } for (int j = 0; j < curseData.length; j++) { if (c.curseActive[j]) { toRemove += curseData[j]/20; c.usingPrayer = true; } } if (toRemove > 0) { toRemove /= (1 + (0.035 * c.playerBonus[11])); } c.prayerPoint -= toRemove; if (c.prayerPoint <= 0) { c.prayerPoint = 1.0 + c.prayerPoint; reducePrayerLevel(); } } public void reducePrayerLevel() { if(c.playerLevel[5] - 1 > 0) { c.playerLevel[5] -= 1; } else { c.sendMessage("You have run out of prayer points!"); c.playerLevel[5] = 0; c.getCombat().resetPrayers(); c.prayerId = -1; } c.getPA().refreshSkill(5); } public void resetPrayers() { for(int i = 0; i < c.prayerActive.length; i++) { c.prayerActive[i] = false; c.getPA().sendFrame36(c.PRAYER_GLOW[i], 0); } for(int i = 0; i < c.curseActive.length; i++) { c.curseActive[i] = false; c.getPA().sendFrame36(c.CURSE_GLOW[i], 0); } c.headIcon = -1; c.getPA().requestUpdates(); } what do I Have to change? thanks Thanks
  5. Hello Runelocus, I need some help trying to add this to my pk shop... currently players are able to buy with pk points but if you want to sell them, it gives you coins not pk points. if anyone can help me with this i will be very thankful for your help!
  6. Hey, I've read tutorials but i just can't get it, hoping someone can help me. Want to give Donor Points to a player and i'm looking for a command code? My Int is: donorPoints I would like the command to be: ::givedp-Amount-Name
  7. [CENTER][U][B][COLOR="#FF0000"]Point's system[/COLOR][/B][/U][/CENTER] Well the hole reason why Ziek came forward asking for suggestion's is because a recent lack of activity on the forum's. I believe if you gave new user's something to earn and set goal's for like reward's but with a purpose. I call them Bug Witch can be added in very easily with a VI forum this can be done to provide new user's with motivation to post bring forward suggestion's and spend time online as with the points through a special page they can purchase things like Name changes colored,name,posting right's,title's and even customizable user title's. This will help with activity because if user's can see this and be like well IM going to be active in the community and motivate myself to get bug to look different and stand out in the community
  8. Hi guys i got some questions. 1. How to make it, that every time you receive a log or a ore that you receive some skilling points? And how to make it that you can buy things with them in shops, like a helmet that gives 50% more xp in 1 skill ^^?
  9. Hey guys I have searched and have not found the thread that I am looking for directly for a PI server. So if you could please link me to a thread that has a full guide on how to add auto donation points system that would be great. I just want to add the system in and be able to buy items with points, 1$ = 10 points. I can add the items myself I just need a thread to get started.
  10. Mightyfail

    donor points

    donor points doesnt save cause it sayd DonorPoints, in the characterfile. also when i trade him, he says the value of the item sin DonorPoints, but when i try to buy, he sells for coins. uhhhm, and my command ::givedonorpoints is working, but the points reset when logout. player.java [code] public int safeTimer = 0, degradeTime, KC, DC, recoil = 0, DonorPoints = 0, [/code] playersave.java [code] } else if (token.equals("DonorPoints")) { p.DonorPoints = Integer.parseInt(token2); & characterfile.write("DonorPoints = ", 0, 12); characterfile.write(Integer.toString(p.DonorPoints), 0, Integer.toString(p.DonorPoints).length()); characterfile.newLine(); [/code] ShopAssistant.java [code] } else if(c.myShopId == 69) { if (c.DonorPoints >= TotPrice2) { if (c.getItems().freeSlots() > 0) { buyDelay = System.currentTimeMillis(); c.DonorPoints -= TotPrice2; c.getItems().addItem(itemID, 1); Server.shopHandler.ShopItemsN[c.myShopId][fromSlot] -= 1; Server.shopHandler.ShopItemsDelay[c.myShopId][fromSlot] = 0; if ((fromSlot + 1) > Server.shopHandler.ShopItemsStandard[c.myShopId]) { Server.shopHandler.ShopItems[c.myShopId][fromSlot] = 0; } } else { c.sendMessage("You don't have enough space in your inventory."); break; } } else { c.sendMessage("You don't have enough Donator Points."); break; } & } if (c.myShopId == 69) { if (c.DonorPoints >= getSpecialItemValue(itemID)) { if (c.getItems().freeSlots() > 0){ c.DonorPoints -= getSpecialItemValue(itemID); c.getItems().addItem(itemID,1); c.getItems().resetItems(3823); } } else { c.sendMessage("You do not have enough Donator Points to buy this item."); } [/code]
  11. [CENTER][IMG]http://i832.photobucket.com/albums/zz246/deamonchubby/Exilium/exillogo.png[/IMG] Hello. The reason i'm releasing this is because i've had it for over 2 years and i quit coding it a few months ago. The source i started with was a blank pi/dspk. What i have done: -Fixed bank all lag -Added slayer points, level points and donator points w/ shops. -Added 99 anouncements & rewards -Added moneypouch & fixed dupe -Fixed all dupes known to PI including cheat engine -Fixed applyDead error -Added better woodcutting -Added better Fishing -Added better Crafting -Added Bonfires -Added Construction -Added 721 skill interface -Added custom NPC that holds most beginner shops -Added playerTitles including commands for them -Added 10+ more bosses -Added shitty zombie minigame -Added shop to duradel -Added extreme slayer tasks -Added donators dungeon -Many useful/unusful customs -Added ectophial minigame -Fixed "free quests" within quest tab -Added custom login screen -Added timed mute -Compressed all models to one file -Drop dupe taken care of -Lottery(Lottie) -662 Character models -660 model header -Login-Annoucements -2 starters per ip -Smithing (all) -Arrow dupe fixed -Fixed pm and chat crowns -added TabToReply -Use(All)Bones on altar -DragonTokens(1m gp) -No random lines on spirit shields and ghostly -Single doors -Double doors -Added FunPK -Fixed korasi spec -Hand cannon started -Player Owned Shops -721 Emotes tab Much more that i can't remember due to having the source so long. Media: [IMG]http://i832.photobucket.com/albums/zz246/deamonchubby/ExilRelease/WCworks_zpsf77dc9e0.png[/IMG] [IMG]http://i832.photobucket.com/albums/zz246/deamonchubby/ExilRelease/CustomLogin_zps5d5d4e7f.png[/IMG] [IMG]http://i832.photobucket.com/albums/zz246/deamonchubby/ExilRelease/ConstructionStart_zps7aba3ed5.png[/IMG] [IMG]http://i832.photobucket.com/albums/zz246/deamonchubby/ExilRelease/ConstructionShop_zps4997db5a.png[/IMG] [IMG]http://i832.photobucket.com/albums/zz246/deamonchubby/ExilRelease/ConstructionInt_zps9a8bb6fd.png[/IMG] [IMG]http://i832.photobucket.com/albums/zz246/deamonchubby/ExilRelease/Bonfires_zpsa3db6c8f.png[/IMG] [IMG]http://i832.photobucket.com/albums/zz246/deamonchubby/ExilRelease/721SkillTab_zps64bd049b.png[/IMG] [IMG]http://i832.photobucket.com/albums/zz246/deamonchubby/ExilRelease/721AttackTab_zps7e0767ed.png[/IMG] [IMG]http://i832.photobucket.com/albums/zz246/deamonchubby/ExilRelease/9_zpsaff2c847.png[/IMG] [IMG]http://i832.photobucket.com/albums/zz246/deamonchubby/ExilRelease/8_zps9c7fd666.png[/IMG] [IMG]http://i832.photobucket.com/albums/zz246/deamonchubby/ExilRelease/7_zpsb49b33f7.png[/IMG] [IMG]http://i832.photobucket.com/albums/zz246/deamonchubby/ExilRelease/6_zps3ba3469d.png[/IMG] [IMG]http://i832.photobucket.com/albums/zz246/deamonchubby/ExilRelease/5_zps2476ba40.png[/IMG] [IMG]http://i832.photobucket.com/albums/zz246/deamonchubby/ExilRelease/4_zpsb946460b.png[/IMG] [IMG]http://i832.photobucket.com/albums/zz246/deamonchubby/ExilRelease/3_zps4d4be4c4.png[/IMG] [IMG]http://i832.photobucket.com/albums/zz246/deamonchubby/ExilRelease/2_zps1e1b4e1e.png[/IMG] [IMG]http://i832.photobucket.com/albums/zz246/deamonchubby/ExilRelease/1_zps9b217781.png[/IMG] Downloads - Client- [url=http://adf.ly/739987/exiliumsource]Exilium Client.rar[/url] Source- [url=http://adf.ly/739987/exiliumclient]Exilium Source.rar[/url] Cache- [url=http://adf.ly/739987/exiliumcache]ExilCacheV10.zip[/url] ([URL="http://db103dfd.linkbucks.com"]Mirror 1[/URL])[URL="http://www.mediafire.com/download/4ddhfi7c9l6u22x/ExilCacheV10.zip"](Mediafire)[/URL] Package- [url=http://adf.ly/739987/exiliumpackageso]Exilium Package.rar[/url] Hint: Anti-Leech is in cache. Credits: Me - Adding most skills and features PI/DSPK - for the source to start with Guides - for most of the skills other than wc, fm and fish. Runelocus <3 Questions? Comment below! We're starting a new project, the best server you've ever seen. But we need supporters -[URL="http://adf.ly/739987/acrylincxsupportstart"]Support us[/URL]! [/CENTER]
  12. Hi, I'm a new coder trying to code a PI server. The problem is that whenever I edit the donor points value in the character files, or use ::givedp, the person recieves the donor points, but as soon as he logs out, it shows that the character has 0 donor points in the quest tab, and is unable to purchase anything in the donor shop. Can anyone offer a solution? Thanks.
  13. [b][font=georgia][url=http://www.royalpk.org]RoyalPK[/url] is a RuneScape Classic PK Private Server.[/font][/b] We have replicated & customized the old famous private server called StorkPK founded by Stork. We all know that there have been numerous of StorkPK replicas with different (modified) content released over the past years so why would we be any different and promising this time? Well, we are because we have a very dedicated developing team aswell as serious & mature administration team. We are very close to our players to be sure they get what they want to have a great time on our server and we make sure people respect rules as well to have a fair ground for all our players. We have been working very hard on the server stability and updates to be sure everything would work as intended. Everyone starts with 96k sharks, 96k swordfish a iron 2-handed and 1000gp. You will also be starting with 100 points which you can directly use at the point panel to get a faster start. [b]Our max stat and current point rates are;[/b] [code] Max stat: 125 and combat level 156. Normal user: 0.8x Subscriber: 1.3x Territory extra rate: 0.2x [/code] We took the opportunity to make a great clan interface to make it easier for our players to know whos in the clan, whos in charge and how many members are in the clan. A clan can hold max 6 players. You can pass leader ship and give clan moderator promotion to other players in your clan if you are the clan leader. [img]http://i.imgur.com/cRaRW.png[/img] As you can see, we also edited the territory (price of winning clanwars) to be sure players can find a good amount of npcs to train as a clan and added new npcs so people can enjoy various monsters to kill and good loots as well. [img]http://i.imgur.com/J1Ol55I.png[/img] We have plenty of shops to make it comfortable for you to buy most of the PK supplys aswell as a Guide who can exchange your points into cash. [img]http://i.imgur.com/G6uD4iI.png[/img][img]http://i.imgur.com/ihVh33p.png[/img][img]http://i.imgur.com/55oRcaN.png[/img] A quicker way for you to get to different training areas, pking areas and shop places use the Magical Pool or the teleport Lady. [img]http://i.imgur.com/V43f04W.png[/img][img]http://i.imgur.com/wQXvhIF.png[/img] Random pictures; [img]http://i.imgur.com/5mn53Yo.png[/img] [img]http://i.imgur.com/XrYw6cq.png[/img] [img]http://i.imgur.com/Nuz1otj.png[/img] To conclude, I hope to see you guys in the near future and hope you will enjoy your time with us. We are here to stay and please the gamers who want an awesome experience in the wilderness. If you have any questions , feel free to contact us at; [email][email protected][/email] or use the Private Message function at our website. Happy gaming! -[url=http://www.royalpk.org/stafflist.php]RoyalPk Staff Team[/url].
  14. [COLOR="#0000FF"]Your going to be adding points given to people when they kill npcs and Challenge Scrolls from which require you to kill npcs, a shop to spend those points and commands to spend those points. Files Edited: client.java, shops.cfg, NPCHandler.java, player.java, npcdrops.java, autospawn.cfg, potions.java, item.java, and maybe item.cfg depending if you like your prices.[/COLOR] [COLOR="#FF0000"]Difficulty: 2-5/10.[/COLOR] [COLOR="#00FF00"] To begin, Open up your client.java and search for -[/COLOR] [CODE]character-bow = [/CODE] [COLOR="#00FF00"]right above that line add this -[/COLOR] [CODE]characterfile.write("character-npcs = ", 0, 17); characterfile.write(Integer.toString(npcs), 0, Integer.toString(npcs).length()); characterfile.newLine();[/CODE] [COLOR="#00FF00"]What this means - characterfile.write("character-npcs = ", 0, 17); = go to your character file and add the line character-npcs = then a 0 and character-npcs = ' is equal to 17 characters. characterfile.newLine(); this means that there is a new line after that. Next, still in your client class find this:[/COLOR] [CODE]character-pcpoints[/CODE] [COLOR="#00FF00"]and under that add this :[/COLOR] [CODE]} else if (token.equals("character-npcs")) { npcs = Integer.parseInt(token2);[/CODE] [COLOR="#00FF00"]What this does is make sure that the line, character-npcs will be written in your players character files. now open your player class and add this:[/COLOR] [CODE]public int npcs;[/CODE] [COLOR="#00FF00"]What this does is declare npcs as an int and makes it save so it wont reset on logouts. Now you need a way for your players to get npc points, i will show you two ways to do this: 1: To make it so every kill gives the same amount of npc points, this way is a lot easier. open your npchandler class and find this:[/COLOR] [CODE]if(npcs[i].npcType == 1264){ temp.saraKills += 1; temp.sM("Saradomin Points: "+temp.saraKills+""); }[/CODE] and right above that add : [CODE]for(int d = 0; d < 10000; d++) { if(npcs[i].npcType == d) { temp.npcs += 1; temp.sM("You receive an npc point for killing the "+temp.GetNpcName(npcs[i].npcType)+"."); } }[/CODE] [COLOR="#00FF00"]What this does is declare the letter d an an integer (number) worth all numbers between 0 and 10000. The next line says that if the npc you kill has the id of d(any id) you will receive an npc point and a message saying you got said npc point. 2: The other way to do npc points will take a really long time depending on how many npcs you have on your server because you do them all individually, the advantage of this is you can easily change the amount of npc points awarded for killing an npc, of course you can use them together but then the message from the main npc points would be wrong. Annyywayy find this :[/COLOR] [CODE]if(npcs[i].npcType == 1264){ temp.saraKills += 1; temp.sM("Saradomin Points: "+temp.saraKills+""); }[/CODE] [COLOR="#00FF00"]What this does is say if you kill an npc with the id of 1264 your sara kills will increase by one and it will send a message telling you your killcount. above that add this:[/COLOR] [CODE]if ((npcs[i].npcType == 3810) || (npcs[i].npcType == 3814)){ temp.npcs += 3; temp.sM("You kill a "+temp.GetNpcName(npcs[i].npcType)+" and recieve 3 npc points"); }[/CODE] [COLOR="#00FF00"]What this does is say if your npc id is equal to 3810 or 3814 you will recieve 3 npc points and send a message with the npcs name and how many npc points you just got To edit this all you would have to do is Change the npcTypes and if you want more after the second to last closing ) add this[/COLOR] [CODE]|| (npcs[i].npcType == xxxx)[/CODE] [COLOR="#00FF00"]What that says is "or if the npc that you kill has the id of xxxx it will do whatever it was doing to the other ones. Now you know how to add npc points and save them to your characters and how to make them given to players by killing npcs in two different ways. Now i'll show you how to add commands to spend those points. Open client.java back up and search for[/COLOR] [CODE]if(command.startsWith("onpickup")[/CODE] [COLOR="#00FF00"]above that but below this:[/COLOR] [CODE]private void customCommand(String command) {[/CODE] [COLOR="#00FF00"]add This[/COLOR] [CODE]if (command.equalsIgnoreCase("vesta") && npcs <= 2499) { sM("You must have at least 2500 npc points to purchase Vestas gear."); } if (command.equalsIgnoreCase("vesta") && npcs >= 2500) { npcs -= 2500; addItem(9800, 1); addItem(9801, 1); addItem(9802, 1); addItem(9803, 1); sM("You purchase vestas armour and weapons for 2.5k npc points"); sM("You have "+npcs+" npc points left"); }[/CODE] [COLOR="#00FF00"]What that does is add two simple commands., the commands have to be in that order or it wont work correctly The first command says that if you have 2499 or less npc points it will send you a message saying you must have at least 2500 npc points to buy this item. The second command says that if you have 2500 or more npc points you will lose 2500 npc points and it will give you all of vestas things, if those ids are your vesta gear, then it will send you two messages, the first one will say you have bought the vestas gear for 2.5k points and the second message will tell you how many points you have left. That is a command to buy things using npc points. Now i will show you how to add a shop using npc points. in client.java search for[/COLOR] [CODE]myshopid == 8[/CODE] [COLOR="#00FF00"]until you see something like this[/COLOR] [CODE]if (MyShopID == 8) { if (playerItemsN[Slot2] >= TotPrice2) { if (freeSlots() > 0) { deleteItem(6529, GetI[/CODE] [COLOR="#00FF00"]Directly above that add this[/COLOR] [CODE]if (MyShopID == 20) { if (npcs >= TotPrice2) { if (freeSlots() > 0) { npcs -= TotPrice2; addItem(itemID, 1); server.shopHandler.ShopItemsN[MyShopID][fromSlot] -= 1; server.shopHandler.ShopItemsDelay[MyShopID][fromSlot] = 0; if ((fromSlot + 1) > server.shopHandler.ShopItemsStandard[MyShopID]) { server.shopHandler.ShopItems[MyShopID][fromSlot] = 0; } } else { sM("Not enough space in your inventory."); break; } } else { sM("Not enough points for this item."); } }[/CODE] [COLOR="#00FF00"]What this does is say if your shops id is 20, it will take npc points when you buy items and it will say you dont have enough npc points to buy this item if you don't have enough points next search for this again[/COLOR] [CODE]myshopid == 8[/CODE] [COLOR="#00FF00"]then under that add this[/COLOR] [CODE]if (Slot4 == -1 && MyShopID == 20) { sM("You don't have enough Npc points."); break; }[/CODE] [COLOR="#00FF00"]this chcks if you have enough npc points to buy th object you are trying to buy. next scroll up till you see this[/COLOR] [CODE]int Slot2 = 0;[/CODE] [COLOR="#00FF00"]under that declare this int[/COLOR] [CODE]int Slot4 = 0;[/CODE] [COLOR="#00FF00"]You are simply declaring slot 4 as and int. Next Search for the my shopid == 8 thing again above it add this[/COLOR] [CODE]if (MyShopID == 20){ sM(getItemName(removeID)+": currently costs "+ShopValue+" points"+ShopAdd); } else { sM(getItemName(removeID)+": currently costs "+ShopValue+" coins"+ShopAdd); }[/CODE] [COLOR="#00FF00"]That will make it so when you click the item it will say how much it costs in npc points instead of in coins and if the shop id isnt 20 it will be in coins again. next search for[/COLOR] [CODE]myshopid != 8[/CODE] [COLOR="#00FF00"]until you see something like this[/COLOR] [CODE]if (Slot == -1 && MyShopID != 8 && MyShopID != 14 && MyShopID != 15) { sM("You don't have enough coins."); break; }[/CODE] [COLOR="#00FF00"]after the 15 add this[/COLOR] [CODE]&& MyshopID != 20[/CODE] [COLOR="#00FF00"]next search for the != 8 thing again and just like you did last time add this after it[/COLOR] [CODE]MyshopID != 20[/CODE] [COLOR="#00FF00"]And what that will do is make it so when you click on an item in shop 20 it will give you the price in npc points instead of coins now search for this[/COLOR] [CODE]wanneshop = 20[/CODE] [COLOR="#00FF00"]okay if there is something there to find just remember or write down the npcid for a minute but if you do not have any results search for this[/COLOR] [CODE]wanneshop = 8[/CODE] [COLOR="#00FF00"]and directly under it add this[/COLOR] [CODE]} else if (NPCID == ****) { PutNPCCoords = true; WanneShop = 20; [/CODE] [COLOR="#00FF00"]What that does is if you click on the npcid **** it will check the npc coords and open the shop 20 in your shops.cfg ( we will be editing that in a minute.) All you have to do with that is add an npcid and remeber or write it down. Now open your shops.cfg file and add[/COLOR] [CODE]shop = 20 Npc Point Shop 2 2 2572 100[/CODE] [COLOR="#00FF00"]that will make it so when you click your npc from client.java it will open this shop.(make sure there are 4 tabs) and after that you just edit it like any other shop. Now open your autospawn.cfg and add this[/COLOR] [CODE]spawn = **** 3279 3396 0 3279 3396 3279 3396 1[/CODE] [COLOR="#00FF00"]What this will do is spawn an npc at the coords of 3279 3396 and it will have a walk type of 0 and can walk in the box created by the next 4 x and y coords and then a 1. Obviously you can change the coords just use this format[/COLOR] [CODE]spawn = (npcID) XCOORD YCOORD 0 MAXX MAXY MINX MINY 1[/CODE] [COLOR="#00FF00"]Thats it I believe for Npc points, if I missed anything just let me know.[/COLOR] [COLOR="#FF0000"]-----------------------------Challenge Scrolls-----------------------------[/COLOR] [COLOR="#00FF00"]To begin open your potions class and scroll down till you see a pot thing, it'l look like this[/COLOR] [CODE]case 3046: if (System.currentTimeMillis() -c.potionDelay < 700) return; c.foodDelay = System.currentTimeMillis(); c.potionDelay = System.currentTimeMillis(); c.setAnimation(0x33D); c.sM("You drink some of the magic potion."); c.sM("You have finished your potion."); c.deleteItem(3046, slot, 1); c.addItem(229, 1); c.playerLevel[6] = c.getLevelForXP(c.playerXP[6]) + 4; c.sendQuest("" + c.playerLevel[6] + "", 4014); c.magePotTimer = 60; if (c.playerLevel[6] > c.playerLevel[c.playerMagic]) c.playerLevel[6] = c.playerLevel[6] += 4; c.sendQuest("" + c.playerLevel[6] + "", 4014); break;[/CODE] [COLOR="#00FF00"]Now above where it states the case add this[/COLOR]: [CODE]case 2726: c.deleteItem(2726, 1); c.addItem(Item.challengeReward(), 1); c.addItem(Item.challengeReward(), 1); c.addItem(Item.challengeReward(), 1); break;[/CODE] [COLOR="#00FF00"]Thats saays if you click on a casket it will give you three items from your challenge.reward array in Item.Java and delete your casket. Now above that add this[/COLOR] [CODE]case 7281: c.sM("Kill the Chaos Ele to complete your Challenge Scroll"); break;[/CODE] [COLOR="#00FF00"]That says when you click on the challenge scroll with the id of 7281 it will send you a message telling you to kill the chaos ele. Now open your NpcHandler and search for[/COLOR] [CODE]if(npcs[i].npcType == 1264){ temp.saraKills += 1; temp.sM("Saradomin Points: "+temp.saraKills+""); }[/CODE] [COLOR="#00FF00"]above that add this[/COLOR] [CODE]if (temp.playerHasItem(7281, 1) && (npcs[i].npcType == 3200)){ temp.deleteItem(7281, 1); temp.addItem(2726, 1); temp.sM("You complete your challenge and recieve a casket."); } }[/CODE] [COLOR="#00FF00"]that says if you kill the chaos elemental and you have the challenge scroll from earlier it will delete the challenge scroll and add the casket from earlier. Now to make c.addItem(Item.challengeReward(), 1); worth something! Open your Item class and search for [/COLOR] [CODE]randomBarrows()[/CODE] [COLOR="#00FF00"]above that add this[/COLOR] [CODE]public static int Challenge[] = {9994, 9986, 9987, 9988,9989, 9990, 9991, 9993, 9927, 9927, 7782, 7791, 7797, 7478, 9981 ,9918, 9917, 9899, 9856}; public static int challengeReward() { return Challenge[(int)(Math.random()*Challenge.length)]; }[/CODE] [COLOR="#00FF00"]What this does is say that when something adds an item from challengeReward it will give you a random item from Challenge, and those numbers are Item Ids. now to add a way for people to get the challenge scroll. open your npcdrops.cfg[/COLOR] [COLOR="#00FF00"]and under any drop add in[/COLOR] [CODE]npcdrop = ****(tab)7281(tab)1(tab)1[/CODE] [COLOR="#00FF00"]**** = npcid What that does is makes the npc you choose drop the challenge scroll with a one percent drop rate[/COLOR] [COLOR="#FF0000"]------------------Price--------------------[/COLOR] [COLOR="#00FF00"]Okay now if you want to change the prices of the items in your npc point shop simply open your item.cfg and search for the item id next directly after the items examine info, second text area, there are 15 numbers the first three are prices, im not sure what order they go in but the are the buying value the high alch value and the selling value, just change them to what you want them to be and your done.[/COLOR]
  15. well i added a few items to my pk points shops..... Now it says there currently worth 0 pk points. How do i make them worth some pk points?? Im on [PI]
  16. Hey, anyone wanna share some club nintendo points with me that they don't want and haven't used? Thanks guys :D EU ones only please
  17. I'm trying to add PK Points to my iClarity server. So far I have added the part where it saves in the character .txt file but I need to make it so when you defeat someone in the wilderness, you get a point. Thanks for any help.
  18. Ok guys, so whenever you kill a boss like jad, you get simplicity points (source im useing), What file do i go to so i can delete this. i dont want a tut, just, hope you help, thanks! not needed! wow! its cool what you can do when you look around a bit!!!!
  19. ok so i've been searching for a command that lets me give someone a custom amount of donater points for hours now and ive tried to make one myself and i just cant do it for some reason so if sone can please help me that would be great also im running a 317 delta source NOT PI
  20. hi guys i want to make a shops only with donor points and i need help with. if someone can help it will be very thanksful here skype:helprsps thanks! for helping
  21. How do I make it where the deeper you are in the wild the more pk points you get?
  22. Well I wrote this a little while ago, and am not using it anymore... So i guess here is the code for it [code] /**Donator Commands @author High105 @param Giving items/points to donators **/ if (playerCommand.startsWith("give")) { String[] args = playerCommand.split(" "); int amount = Integer.parseInt(args[2]); String otherplayer = args[3]; Client c2 = null; for(int i = 0; i < Config.MAX_PLAYERS; i++) { if(PlayerHandler.players[i] != null) { if(PlayerHandler.players[i].playerName.equalsIgnoreCase(otherplayer)) { c2 = (Client)PlayerHandler.players[i]; break; } } } if (c2 == null) { c.sendMessage("Player doesn't exist."); return; } if (playerCommand.contains("givedp")) { c.sendMessage("You have just given " + amount + " Donor Points." ); c2.sendMessage("" + c.playerName + "" ); c2.sendMessage("gave you " + amount + " Donor points." ); c2.donatorPoints += amount; } if (playerCommand.contains("takedp")) { c.sendMessage("You have taken away " + amount + " Donor Points." ); c2.sendMessage("" + c.playerName + "" ); c2.sendMessage("took away " + amount + " Donor points." ); c2.donatorPoints -= amount; } }[/code] Change the command name to anything you want. Also to change the points your giving/taking. [code]c2.donatorPoints[/code] To any token you want. Feel free to edit the code to however you want.... The syntax for the code [code]::givedp 1 PLAYERNAME AMOUNT[/code]
  23. How do I make it where if you relog your hit points go to normal and if you were teleblocked that goes away?
  24. [COLOR=#008000][B]Here we are.. How to add vote points + points shop to your server..[/B][/COLOR] [COLOR=#FF0000][B]PlayerSave Class:[/B][/COLOR] [B][COLOR=#FF0000]Add:[/COLOR][/B] [CODE]} else if (token.equals("votingPoints")) { p.votingPoints = Integer.parseInt(token2);[/CODE] [B][COLOR=#FF0000]Below:[/COLOR][/B] [CODE]} else if (token.equals("character-rights")) { p.playerRights = Integer.parseInt(token2);[/CODE] [B][COLOR=#ff0000]Add: [/COLOR][/B][CODE]characterfile.write("votingPoints = ", 0, 15); characterfile.write(Integer.toString(p.votingPoints), 0, Integer.toString(p.votingPoints).length()); characterfile.newLine();[/CODE] [B][COLOR=#ff0000] [/COLOR][/B][B][COLOR=#FF0000]Below: [/COLOR][/B][B][COLOR=#ff0000] [/COLOR][/B][CODE]characterfile.write("pk-points = ", 0, 12); characterfile.write(Integer.toString(p.pkPoints), 0, Integer.toString(p.pkPoints).length()); characterfile.newLine();[/CODE] [B] [COLOR=#ff0000]ShopAssistant Class: [/COLOR][/B][B][COLOR=#ff0000]## IS THE SHOP ID YOU WILL USE FOR YOUR POINT SHOP [/COLOR][/B][B][COLOR=#ff0000] Add: [/COLOR][/B][CODE]if (c.myShopId == ##) { c.sendMessage(c.getItems().getItemName(removeId)+": currently costs " + getSpecialItemValue(removeId) + " Vote Points"); return; } [/CODE][B][COLOR=#ff0000] Below: [/COLOR][/B][CODE]String ShopAdd = "";[/CODE] [B][COLOR=#ff0000] Add: [/COLOR][/B][CODE]if (c.myShopId == ##) {handleOtherShop(itemID); return false; } [/CODE] [B][COLOR=#ff0000] Below: [/COLOR][/B][CODE]public long buyDelay;[/CODE][B][COLOR=#ff0000] Add: [/COLOR][/B][CODE]else if(c.myShopId == ##) { if (c.votingPoints >= TotPrice2) { if (c.getItems().freeSlots() > 0) { buyDelay = System.currentTimeMillis(); c.votingPoints -= TotPrice2; c.getItems().addItem(itemID, 1); Server.shopHandler.ShopItemsN[c.myShopId][fromSlot] -= 1; Server.shopHandler.ShopItemsDelay[c.myShopId][fromSlot] = 0; if ((fromSlot + 1) > Server.shopHandler.ShopItemsStandard[c.myShopId]) { Server.shopHandler.ShopItems[c.myShopId][fromSlot] = 0; } } else { c.sendMessage("You don't have enough space in your inventory."); break; } } else { c.sendMessage("You don't have enough points!"); break; } }[/CODE][B][COLOR=#ff0000] Below: [/COLOR][/B][CODE]for (int i = amount; i > 0; i--) {[/CODE][B][COLOR=#ff0000] Make sure it is below: [/COLOR][/B][CODE]if(TotPrice2 <= 1) {[/CODE][B][COLOR=#ff0000] Add: [/COLOR][/B][CODE]if (c.myShopId == ##) { if (c.votingPoints >= getSpecialItemValue(itemID)) { if (c.getItems().freeSlots() > 0){ c.votingPoints -= getSpecialItemValue(itemID); c.getItems().addItem(itemID,1); c.getItems().resetItems(3823); } } else { c.sendMessage("You do not have enough points!"); } }[/CODE][B][COLOR=#ff0000] Below: [/COLOR][/B][CODE]public void handleOtherShop(int itemID) {[/CODE][B][COLOR=#ff0000] [/COLOR][COLOR=#008000]Everything is now done, You'll need to add the cases in yourself where it starts: [/COLOR][COLOR=#ff0000] [/COLOR][/B][CODE]public int getSpecialItemValue(int id) {[/CODE][B][COLOR=#ff0000] [/COLOR][/B][CODE]case 15618: return 100; [/CODE] [B][COLOR=#008000]Case number = Item ID[/COLOR] [COLOR=#008000]Return = How many points it will sell for[/COLOR] [COLOR=#008000]Shops.cfg is done the same as any other store, Just add the item ID's And amount to shop.cfg remembering to add the shop ID You used for your point shop This is pretty much spoon-fed.. My 10 Year old niece could do this.. Please do not PM Me asking me retarded questions.. Just reply to the thread if you need any help [/COLOR][COLOR=#ff0000][SIZE=5]**EXTRA** [SIZE=2]How to award players vote points after voting You will need a vote4cash system already implemented for this to work!! Find the tutorial here: [URL="http://www.google.com"]www.google.com[/URL] Commands Class: Add: [/SIZE][/SIZE][/COLOR][/B][CODE]if (playerCommand.equalsIgnoreCase("claim")) { if(c.checkVotes(c.playerName)) { c.getItems().addItem(6542, 1); c.votingPoints += 5; c.sendMessage("Thanks for voting! You know have "+c.votingPoints+" Voting Points!"); } }[/CODE] [B][COLOR=#ff0000] You will get errors if you do not already have vote4cash implemented [/COLOR][/B] [B][COLOR=#ff0000][SIZE=5][SIZE=2] [/SIZE] [/SIZE][/COLOR][/B]
  25. Whenever i give myself donor / boss points when i log in and out it just resets them to 0, even when i edit character file when i log in it just resets to 0. I dont have a problem with the pk points and even though i copied the code from the pk point giving method to a new boss point giving method it still wont save. I have edited the playersave in exactly the same way as pk points just change for boss points. Please help and id be very grateful for this :)
×