Look at what a super strength pot does, then add that into your code.
|
|
Hey, I'm trying to make it so a Summoning NPC will give you a strength boost.
This is the code I've constructed so far,
Now i want to make it so whenever you talk to it, it will give you the strength boost.Code:if(pnp.npcType == 7347) { if(p.skillLvl[23] > 78) { if(p.ActionTimer == 0) { p.ActionTimer = 150; p.frames.showChatboxInterface(p, 241); p.frames.animateInterfaceId(p, 9760, 241, 2); p.frames.setNPCId(p, 7347, 241, 2); p.frames.setString(p, "Talon Beast", 241, 3); p.frames.setString(p, "ROAR! For awkening me, take this Strength Boost!", 241, 4); p.frames.sendMessage(p, "Your Strength has been boosted!"); p.requestGFX(1310, 0); } } }
Any help?
THANKS!
Look at what a super strength pot does, then add that into your code.
Here's the code from super strength, Okay what would i pull from the coding?
Code:case 157: if (p.drinkDelay <= 0) { p.drinkDelay = 3; p.combatDelay += 2; pi.deleteItem(p, itemId, itemSlot, 1); p.requestAnim(829, 0); changeStat(p, 2, (int) (p.getLevelForXP(2) * 0.15) + 5, 1, true); pi.addItem(p, 159, 1); } break;

I hope you were playing dumb, 0v3rc0m3 but this was the line:
Duh.Code:changeStat(p, 2, (int) (p.getLevelForXP(2) * 0.15) + 5, 1, true);
Okay just making sure because i did try that. But you need a method like p.frames.
or p.
and i tried it but i got errors about not having a method or something.
:\

try this
Code:if(pnp.npcType == 7347) { if(p.skillLvl[23] > 78) { if(p.ActionTimer == 0) { p.ActionTimer = 150; p.frames.showChatboxInterface(p, 241); p.frames.animateInterfaceId(p, 9760, 241, 2); p.frames.setNPCId(p, 7347, 241, 2); p.frames.setString(p, "Talon Beast", 241, 3); p.frames.setString(p, "ROAR! For awkening me, take this Strength Boost!", 241, 4); p.frames.sendMessage(p, "Your Strength has been boosted!"); p.requestGFX(1310, 0); changeStat(p, 2, (int) (p.getLevelForXP(2) * 0.15) + 5, 1, true); } } }
How is this in the wrong section you idiot. This is for Players to Post there codes and others to configure them. Jesus, get the fuck out new guy.
ever heard of: never look at post count of somebody, this is my second account because david banned me for no reason
i'm Nathan. and you are just a little bug for me
on topic: isn't he requesting for help?? so this is the wrong section (and tbh that code is no way near configuration)
| « fixing the error_js5connect | Basic thieving source » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |