Where is lastSummon defined?
|
Base: PI
Compiling Errors:None
Pictures:
Code: This is all in client.java
I have declared my summonTime integer here at the top here
Then after a couple of scroll downs I have this codeCode:public int currentDamage = 0; public int summonTime = 60; public int followPlayer; public int npcslot;
Code:public void summonTime() { if(summonTime >= 0 && lastsummon > 0) { summonTime --; } if(summonTime == 0) { sendMessage("Your summoning pet time has run out..."); lastsummon = 0; summonTime = -1; } }
Yes?
Now viewing it comes here: with these
with all of that...Code:safeTimer = 0; getItems().resetItems(3214); getItems().sendWeapon(playerEquipment[playerWeapon], getItems().getItemName(playerEquipment[playerWeapon])); getItems().resetBonus(); getItems().getBonus(); getPA().sendFrame126("Combat Level: "+getCombatLevel()+"", 3983); getPA().sendFrame126(""+getCombatLevel()+"", 17025); getPA().sendFrame126(""+summonTime+"", 17021); getItems().writeBonus();
and as you can see in the .gif nothing fucking works this is 5th day trying so annoying now... if anyone could please help:crybaby:
Where is lastSummon defined?
the very top...
here:
[code]
public class Client extends Player {
public byte buffer[] = null;
public int cannonTimer = 0;
public int s;
public Stream inStream = null, outStream = null;
private IoSession session;
public static PlayerSave save;
public static Client cliento2;
public int totalstored;
public int currentDamage = 0;
public int summonTime = 60;
public int followPlayer;
public int npcslot;
public int summoningnpcid;
public int timer;
wwwoooops rofl, i thought you meant summonTime stupid dumbass that I am..
here
Code:public int summoningslot = 0; public int storeditems[] = new int[29]; public boolean picking = false; public int amount[] = new int[29]; public boolean occupied[] = new boolean[29]; public boolean storing = false; public int attackingplayer; public int lastsummon; public int summonTime; public boolean summon; public int secs; public int mins; public int hours;
As you've written "public int lastsummon;" rather than "public int lastsummon = 0;" it has been given a null value. Try changing that to 1 or 0 (cheaphax) or in the method where the NPC is summoned add this code. (fixing properly)
And where the NPC is removed add this code.Code:lastsummon = 1;
Code:lastsummon = 0;
I don't think I should do that as...
in clickingbuttons.java and other summoning instances lastsummon; is a main int.
e.g.
lastsummon is preventing other people from using scrolls on someone els'es nPCCode:case 66117://button id switch(c.lastsummon) { case 6823: //unicorn :D if (c.getItems().playerHasItem(12434, 1)) { c.getItems().deleteItem(12434, 1); c.gfx0(247); c.playerLevel[3] += (c.getLevelForXP(c.playerXP[3]) * .33); if (c.playerLevel[3] > c.getLevelForXP(c.playerXP[3])) c.playerLevel[3] = c.getLevelForXP(c.playerXP[3]); c.getPA().refreshSkill(3); c.sendMessage("You activate the scroll."); c.getPA().refreshSkill(1); c.getPA().refreshSkill(3); c.getPA().refreshSkill(3); c.sendMessage("You heal yourself...and feel slightly rejuvenated"); } else { c.sendMessage("You don't have a summon scroll!"); }
48hr bump.
I managed to get something to work... i guess :L i used theowner's snipper and here is what I get.
do i have to change theCode:public int secs; public int mins; public int hours; public void spawnTimer() { spawnTimer(); EventManager.getSingleton().addEvent(new Event() { public void execute(EventContainer b) { secs++; mins = secs/60; hours = secs/3600; getPA().sendFrame126(""+mins+"", 17021); if(lastsummon < 0) { b.stop(); } } }, 1000); }toCode:public int secs;?Code:public int secs = 1800; to get 30 mins
or do something like this?
but that does not work for me .. btw I have called the event.Code:switch(lastsummon) { case 6823: secs = 1800; break; }
it just stays like this no matter what D:
can someone help me?
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |