Jump to content

_Dynosawr_

Members
  • Posts

    69
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by _Dynosawr_

  1. I offer to take a look at the script and fix it up for you, but not now because I'm tired. I'll work on it tomorrow though! ^^
  2. No problem! Except I didn't really code it. o.o (All I did was fix the error xD)
  3. Since I don't know anything about SRC, what would it be to add the mapname as well?
  4. You can use getmapxy on monsters, but it won't work if they're dead.
  5. You can't change the color of dispbottom, it's always a greenish/bluish color, like guild chat.
  6. As I thought, using getmapxy on a monster after it's dead won't work. You'll have to use the coordinates of the spawn in the broadcast instead. Preset in script variables: set .@mapname$,"prontera"; set .@x,150; set .@y,150; monster .@mapname$,.@x,.@y,"Poring",1002,1,"eqwep::OnMonsterKilled; announce "I have spawned a Poring on the map "+.@mapname$+" at the coordinates "+.@x+" "+.@y,0; end; OnMonsterKilled: announce "The monster has been killed at the coordinates "+.@x+" "+.@y+" on the map "+.@mapname$,0; end; Spawn input: input .@mapname$; next; input .@x; next; input .@y; mes "Are you sure you want it spawned here?: "+.@mapname$+" "+.@x+" "+.@y; menu "Yes",L_spawn,"No",L_cancel; L_spawn: monster .@mapname$,.@x,.@y,"Poring",1002,1,"eqwep::OnMonsterKilled"; announce "I have spawned a Poring on the map "+.@mapname$+" at the coordinates "+.@x+" "+.@y,0; end; L_cancel: mes "Very well."; close; OnMonsterKilled: announce "The monster has been killed at the coordinates "+.@x+" "+.@y+" on the map "+.@mapname$,0; end;
  7. _Dynosawr_

    Fame

    As far as I know, you can only buff up Stats. Like this: statusup2 bStr,1; // Permanantly increases Str by 1 statusup2 bAgi,1; // Permanantly increases Agi by 1 statusup2 bVit,1; // Permanantly increases Vit by 1 statusup2 bInt,1; // Permanantly increases Int by 1 statusup2 bDex,1; // Permanantly increases Dex by 1 statusup2 bLuk,1; // Permanantly increases Luk by 1 PS: I'm not sure about this, but I believe resetting stats will remove those bonuses. You'll have to test that out to be sure. Edit: Here's the script (Minus the bonuses): http://pastebin.com/raw.php?i=dmZNbnLD
  8. Using variables in the spawn: set .@mapname$,"prontera"; set .@x,150; set .@y,150; monster .@mapname$,.@x,.@y,"Poring",1002,1,"eqwep::OnMonsterKilled; announce "I have spawned a Poring on the map "+.@mapname$+" at the coordinates "+.@x+" "+.@y,0; end; OnMonsterKilled: getmapxy(.@mapname2$,.@x2,.@y2,3,"Poring"); announce "The monster has been killed at the coordinates "+.@x2+" "+.@y2+" on the map "+.@mapname2$,0; end; You could also use input commands to set the coordinates and map of the spawn. Like this: input .@mapname$; next; input .@x; next; input .@y; mes "Are you sure you want it spawned here?: "+.@mapname$+" "+.@x+" "+.@y; menu "Yes",L_spawn,"No",L_cancel; L_spawn: monster .@mapname$,.@x,.@y,"Poring",1002,1,"eqwep::OnMonsterKilled"; announce "I have spawned a Poring on the map "+.@mapname$+" at the coordinates "+.@x+" "+.@y,0; end; L_cancel: mes "Very well."; close; OnMonsterKilled: getmapxy(.@mapname2$,.@x2,.@y2,3,"Poring"); announce "The monster has been killed at the coordinates "+.@x2+" "+.@y2+" on the map "+.@mapname2$,0; end; Note: I haven't tested the getmapxy like that, but I'm fairly sure that's how it's used. Also, I'm not sure if it will work because of the monster being dead when it's executed. My guess is that it won't though.
  9. Why not just use close2;? Like this: close2; warp "SavePoint",0,0; end; Saves an extra line
  10. Try this: function Go { sleep2 2600; warp getarg(0),getarg(1,0),getarg(2,0); getmapxy(lastwarp$,lastwarpx,lastwarpy,0); close; } Also, addtimercount won't work unless there's already a timer running. Using addtimercount will ADD a specified amount of ticks onto the timer specified. If there is no timer that's running, it is not going to do anything. -------------------------------------------------------------------------------------- Edit: If you must have a timer for it, then it would look like this: function Go { addtimer 2600,"My NPC::OnMyLabel"; OnMyLabel: warp getarg(0),getarg(1,0),getarg(2,0); getmapxy(lastwarp$,lastwarpx,lastwarpy,0); close; } From my experiences, deltimer isn't useful unless the timer is running and maybe someone does something which triggers it to cancel. Say...someone has to kill something in a specified amount of time, and they succeed. In that situation, using deltimer to delete the timer would allow that person to succeed in that task.
  11. Ah okay, missed that. @backtea Could you provide a screenshot of the error in your mapserver window?
  12. There's plenty of gaps in the NPC ID's though. You should be able to use those gaps for custom sprites etc. Edit: Here's a link to an NPC list. http://www.dotalux.com/ro/npclist/ None of these are custom sprites, so they should all already be in your server. If you look through them I'm sure you can find missing #'s that will be usable for you.
  13. It will read Caspen AND Prontera. You're simply adding Caspen to the map list. Replacing Prontera will cause errors and make the Prontera map completely unusable.
  14. Just put a 'close2;' command there, then type the code of what you want done after that command. Close2 will close the window without ending the script. But make sure you use an 'end;' command to end the script, so that it doesn't mess anything up. Example: prontera,150,150,3<TAB>script<TAB>TestNPC123<TAB>70,{ mes "Close this window."; close2; npctalk "What? What is this? I'm still talking??"; end; } Replace all the <TAB>'s with actual tabs.
  15. I loaded it up and it's working fine for me. The only problem being this: //=========== TIMER SHOW ==================== <header>,{ mes "^66CCFF[Mining Area]^000000"; mes "Mining Time Limit:"; mes "^FF0000" + mine_day$ + "/" + mine_month$ + "/" + mine_year$ + " " + mine_hour$ + ":" + mine_minute$ + "^000000"; close; } //=========================================== Which I changed to this: //=========== TIMER SHOW ==================== - script MiningArea -1,{ mes "^66CCFF[Mining Area]^000000"; mes "Mining Time Limit:"; mes "^FF0000" + mine_day$ + "/" + mine_month$ + "/" + mine_year$ + " " + mine_hour$ + ":" + mine_minute$ + "^000000"; close; } //===========================================
  16. - script BattleRefine::BattleRefineScript1 -1,{ OnNPCKillEvent: if(rand(1,100)>100)end; for(set .@i,0; .@i<11; set .@i,.@i+1){ if (.@i<10) set .@j, rand(1,10); else set .@j, .@i-9; if(getequipisequiped(.@j)&&getequiprefinerycnt(.@j)<100){successrefitem .@j;end;}} end; } It's working perfectly now! Thanks! ♥
  17. Thanks, but now the problem is that even when I set the chance to 100, and have one item equipped it doesn't always work. I want it to be random, but I want it to be random on the items that are equipped, not the slots. Any ideas on how to fix that? (For example, 100% chance to refine would mean that if 1 item is equipped, it would refine after EVERY kill, not just every few kills)
  18. Oh okay. I didn't understand that. I'll test it out, thanks :3 Edit: Will this work? ;o OnNPCKillEvent: set .@chance, rand(1,100); if(.@chance>5)end; for (set .@i,0; .@i<20; set .@i,.@i+1) { // 20: Prevents infinity loop if nothing is equipped set .@j, rand(1,10); if (getequipisequiped(.@j) && getequiprefinerycnt(.@j) < 100) { successrefitem .@j; end; } } end; }
  19. Ohhh okay. But, how would I be able to change the chance of it actually working? Say I want a random item refined once at a 5% chance. So that you'd have to kill approx 20 monsters to refine a random item once, and if the item slot is empty, it randomly tries to find one that isn't empty? ;o PS: If you have MSN/Skype I'd appreciate you telling me so I could possibly get some live help on this. (Easier to understand xD)
  20. I've been screwing around with this and I'm trying to use a FOR loop. - script BattleRefine::BattleRefineScript1 -1,{ OnNPCKillEvent: set refinechance,rand(1,100); if(refinechance>=1)&&(refinechance<=100){ for(set part,rand(1,10); getequipid(part) == 0; return 1){ Right here, I'm trying to have it set the 'part' variable to a random integer between 1 and 10. Then the next part checks to see if the player has an item equipped there, and if he doesn't, re-set the variable to a different integer between 1 and 10 and check if that slot is empty or not. I want it to do this until it gets a slot that isn't empty. for(set refineamt,getequiprefinerycnt(part); refineamt >= 100; return 3){ Here I'm trying to make the script find out if the item that is equipped has a refine amount of 100+, and if it does, restart from the first for loop. successrefitem part; set refinechance,null; set refinechance2,null; set part,null; set refineamt,null; end;} } }else{ end; } } And finally, if the previous for statements worked correctly, and the slot had an item equipped in it, and it's refine was less than 100, it would refine the item once and set the variables to nothing. Help would be much appreciated, leave a post or PM me. :3
×
×
  • Create New...