Can we see the error?
|
So I have been trying for the past 30 mins to get this workin i got the code here for the npc to talk but i keep getting a error message.
I'm using a project-xile base atm, working on a spawn server right now
Code:if (npcs[i].npcType == NPCID) { if (misc.random2(30) <= 2) { npcs[i].updateRequired = true; npcs[i].textUpdateRequired = true; npcs[i].textUpdate = "Text goes here."; }
Can we see the error?
you might be missing a bracket? (you haven't shown us error yet)
Code:if (npcs[i].npcType == the npcs id){ //npc name if (Misc.random2(timer) <= 3) { npcs[i].updateRequired = true; npcs[i].forceChat("Message"); } }
im sorry lemme explain it its says im missing something right here
just right after it...Code:if (npcs[i].npcType
says like im missing a ")" but when i give it a try? like it gives me more errors idk i feel dumb atm
NPCHandler.java Under this
Add your NPC that you want to shout.Code:if (npcs[i].walkingHome && npcs[i].absX == npcs[i].makeX && npcs[i].absY == npcs[i].makeY) { npcs[i].walkingHome = false; } else if(npcs[i].walkingHome) { npcs[i].moveX = GetMove(npcs[i].absX, npcs[i].makeX); npcs[i].moveY = GetMove(npcs[i].absY, npcs[i].makeY); npcs[i].getNextNPCMovement(i); npcs[i].updateRequired = true; }
Code:if (npcs[i].npcType == ####) { //NPC ID here. npcs[i].forceChat("insert your message here"); }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |