Jump to content

Z3R0

Members
  • Posts

    614
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by Z3R0

  1. Update: I managed to get the video for the Request done, however, it was my first run through of the script and probably a little "whacky" took over an hour to go through the entire script and really get in detail what it did. Now that I have been through it once, I am going to end up redoing the walkthrough without all the uhm's and searching, because I know where it's all at... Tonight hopefully more things will be updated. I apologize for the wait, however I want to make sure it's clean and understandable. Hopefully I will get time tonight to fix up these videos. Thanks
  2. I did +10 or greater... simply change this line if (@inventorylist_refine[[email protected]] >= 10) { to == instead of >=
  3. Due to children the videos are taking longer to record. Chapter 2 will be done tonight along with a walk through request over dynamics specifically explaining euphy's quest shop npc.
  4. U didn't answer my question does ur debug message run?
  5. Might be nice sadder to state what was wrong or what u changed or uploaded?
  6. If anyone would like to collaborate they could do src tutorials and I could splice then in with the rest. Unfortunately. I am not any good at src mods... :/
  7. I don't really know what to say about an advanced menu system but more of it being dynamic... there isn't much u can do to make it "advanced" probably need to change that title
  8. Chapter 2 variables should be released tomorrow night I will be in production tomorrow hopefully
  9. Follow the same thing for blacklist... OnInit: .blacklist$ = "501,502,503,504,505"; .onmaps$ = "prontera,geffen,morocc"; then on... OnPCDieEvent: if (countitem(7773) >= 1) end; if (BaseLevel < 40) end; // Will halt the rest of the script if they are not on a map that is allowed if (!compare("," + .onmaps$ + ",", "," + strcharinfo(3) + ",")) end; // ....
  10. Chapter 1 (The Basics) has been fully uploaded. You can view the Playlist here: https://www.youtube.com/watch?v=vR563-KlMUo&list=PLEDk4ERsxAQBrVKVssnQhsQL20xH9DeHr
  11. Thanks! There will be many more as we get more into the series for advanced scripters as well, but I had to start somewhere
  12. hmmm that is strange actually you are correct and I was wrong, the key does infact include the # sign. wonder why it won't delete then? does your debugmes run at that time?
  13. Welcome Everyone! Some of you may remember my old video series NPC Scripting 4 Dummies... Unfortunately, due to pesronal issues, I had to take a step back from rAthena and RO in general and I was out of touch with everything. MANY MANY MANY Things have changed, so I am going to be completely re-doing the series! I have begun production on Chapter 1 and should have that complete by the end of the weekend, and soon Chapter 2 will be released. Simply subscribe and you will know when new videos are added! Here is the channel and I will post here when new updates are released! Last time, I embedded every video, which I may do again, but for simplicity sake, just go to the channel! Right now, there are very limited videos, but there will be LOTS more to come! NPC Scripting 4 Dummies (YouTube Channel) Please keep in mind, this is still a work in progress and will take time. Chapter 1: The Basics - Complete Playlist: https://www.youtube.com/watch?v=vR563-KlMUo&list=PLEDk4ERsxAQBrVKVssnQhsQL20xH9DeHr Section 1 (Tutorial Setup) https://www.youtube.com/watch?v=vR563-KlMUo Section 2 (Starter NPC) https://www.youtube.com/watch?v=Vrq4LcPRn3s Section 3 (Mes Command) https://www.youtube.com/watch?v=n6eqa7WietI Section 4 (Duplicate & Float) https://www.youtube.com/watch?v=GjyNUBkTN28 Section 5 (Next, Close, & Comments) https://www.youtube.com/watch?v=BGZ0uS2DrLc Chapter 2: Variables - In Progress Chapter 3: Debugging - Chapter 4: Basic Menu System Chapter 5: Math & Logic Chapter 7: Player Input Chapter 8: Loops Chapter 9: Arrays Chapter 10: Dynamic Menu System Chapter 11: Functions Chapter 12: Events Chapter 13: Instances Chapter 14: To Be Determined...
  14. Sure? Just attach the script to the player first... attachrid(char_id); // then perform dispbottom() ?
  15. What's with the semi-colon within the sql statement? I don't think that needs to be there... Also, the sql key isn't goign to be #day_event ... it already knows it's an account variable beacuse it's in the acc_reg_num table... the variable is just "day_event"
  16. Hmmm I like that compare feature... implode an array with commas... and prefix string with starting and ending commas... check against ,#, smart move...
  17. Would it be a specific +10 item = a specific reward? prontera,158,173,4 script ItemExchanger 88,{ mes("Welcome!"); mes("I can trade certain +10 items with other items hehe :D"); // Clear Inventory List Information ClearGetInventoryList(); getinventorylist; set([email protected], 0); set([email protected]$, ""); // First we loop through all available exchange items for([email protected] = 0; [email protected] < getarraysize(.exchange_items); [email protected]++) { // Now we check if it exists in the inventory [email protected] = array_find(@inventorylist_id, .exchange_items[[email protected]]); if ([email protected] >= 0) { // Item was found :D // Now we need to check and make sure that it is a PLUS 10 item if (@inventorylist_refine[[email protected]] >= 10) { // We have verified that it's +10 or more and we will add it to our menu and psuedo array set([email protected]_items[[email protected]], [email protected]); set([email protected]_refine[[email protected]], @inventorylist_refine[[email protected]]); set([email protected]_items[[email protected]], [email protected]); set([email protected]_amount[[email protected]], [email protected]); [email protected]$ += ([email protected]$ == "" ? "" : ":") + "+" + @inventorylist_refine[[email protected]] + " " + getitemname(@inventorylist_id[[email protected]]); [email protected]++; } } } // Now we show them the trade menu set [email protected], select([email protected]$) - 1; // We subtract 1 to get an array index point mes("You have chosen to trade +" + [email protected]_refine[[email protected]] + " " + getitemname([email protected]_items[[email protected]])); mes("You will receive " + [email protected]_amount[[email protected]] + "x " + getitemname([email protected]_items[[email protected]])); if (select("Yes, Trade:Nevermind") == 1) { mes("Thanks, Come back soon!"); close; } // They opted to trade, let's do it! delitem @inventorylist_id[[email protected]_items[[email protected]]], 1; getitem [email protected]_items[[email protected]], [email protected]_amount[[email protected]]; mes("Here you go"!); close; OnInit: setarray(.exchange_items, 1201, 1202, 1203); // 3 Knives (0 slot, 1 slot, 2 slot) setarray(.reward_items, 501, 502, 503); // Red Potion, Orange Potion, Yellow Potion setarray(.reward_amount, 1, 5, 10); // Amount to return end; } function script ClearGetInventoryList { deletearray(@inventorylist_id); deletearray(@inventorylist_amount); deletearray(@inventorylist_equip); deletearray(@inventorylist_refine); deletearray(@inventorylist_identify); deletearray(@inventorylist_attribute); deletearray(@inventorylist_card1); deletearray(@inventorylist_card2); deletearray(@inventorylist_card3); deletearray(@inventorylist_card4); deletearray(@inventorylist_expire); deletearray(@inventorylist_bound); set(@inventorylist_count, 0); return; } Untested
  18. That's because emistry goofed! haha... you need to getpartymember(getcharid(1), 2); so that it gets account id
  19. Omg I completely forgot about countitem... zomg! This is how out I have been wow...
  20. prontera,158,173,4 script CoinExchanger 88,{ mes("Welcome"); mes("Please give me your coins..."); // Check Inventory for Coins getinventorylist; freeloop(true); [email protected] = 0; for([email protected]_index = 0; [email protected]_index < getarraysize(.exchange_ids); [email protected]_index++) { for([email protected] = 0; [email protected] < @inventorylist_count; [email protected]++) { if (@inventorylist_id[[email protected]] == .exchange_ids[[email protected]_index]) { if (@inventorylist_amount[[email protected]] >= .exchange_amount[[email protected]_index]) { set([email protected]_coin_index[[email protected]], [email protected]_index); set([email protected]$, [email protected]$ + ( [email protected]$ == "" ? "" : ":" ) + getitemname(.exchange_ids[[email protected]_index]) + "(" + @inventorylist_amount[[email protected]] + ")"); [email protected]++; } } } } freeloop(false); if ([email protected]$ == "") { next; mes("You do not have any coins!"); close; } // Display Option to Show them choices and how many coins they have... set [email protected], select([email protected]$) - 1; // Subtract 1 to get Array Index set [email protected], [email protected]_coin_index[[email protected]]; // dispbottom("You have chosen to use " + getitemname(.exchange_ids[[email protected]]) ); // dispbottom("Progress bar Duration is: " + .exchange_duration[[email protected]] + " seconds."); mes("Goodluck"); close2; progressbar("00FF00", .exchange_duration[[email protected]]); // Start the Progressbar // On Progress Bar Completion... let's see what we do here... delitem(.exchange_ids[[email protected]], .exchange_amount[[email protected]]); freeloop(true); for([email protected] = 0; [email protected] < getarraysize(.available_items); [email protected]++) { [email protected] = rand(1, 100); if ([email protected] <= .available_chance[[email protected]]) { // GET THE ITEM mes "Here you go"; getitem(.available_items[[email protected]], .available_amount[[email protected]]); if (.available_chance[[email protected]] <= .announce_level_chance) { announce(strcharinfo(0) + " just scored " + getitemname(.available_items[[email protected]]), bc_all, C_YELLOW); } close; } } freeloop(false); mes("You got the default prize..."); getitem(.default_item, .default_amount); close; OnInit: setarray(.exchange_ids, 673, 675, 671, 677); setarray(.exchange_amount, 1, 1, 1, 1); setarray(.exchange_duration, 10, 8, 5, 2); // # of seconds to progressbar... setarray(.available_items, 501, 502, 503, 504); setarray(.available_amount, 1, 1, 1, 1); setarray(.available_chance, 50, 40, 30, 10); // % of 100 set(.announce_level_chance, 10); // Will only display announce if they get item 504... since it's the only one with 10 chance or lower set(.default_item, 501); set(.default_amount, 1); end; } This should work
  21. I still hate you sometimes *much love*
  22. What are u confused about it looks pretty straight forward // Untested - script PartyExp -1,{ OnPartyExpKilled: // Clear the Server Party Variables set($ @ partymembercount, 0); deletearray($ @ partymemberaid, getarraysize( $ @partymemberaid)); // Get the Corresponding Party Information getpartymember(getcharid(1)); // Loop Through Party Members for([email protected] = 0; [email protected] < $ @ partymembercount; [email protected]++) { // Attach the player id attachrid($ @ partymemberaid[[email protected]]); set(BaseExp, BaseExp + 1000); // Give Base Exp set(JobExp, JobExp + 1000); // Give Job Exp getitem(501,1); // Give Item // Unattach Player from the Script detachrid; } announce("Wootzers! You Done It!", bc_map, C_YELLOW); end; }
  23. Ok, I can look into it tonight, sorry, I am at work, just thought I would whip something up, I can test it out tonight late though if you don't have anyone to debunk it by then... Sorry for it not working right off the bat
  24. Crude and Highly Untested prontera,158,173,4 script CoinExchanger 88,{ mes("Welcome"); mes("Please give me your coins..."); // Check Inventory for Coins getinventorylist; freeloop(true); for([email protected]_index = 0; [email protected]oin_index < getarraysize(.exchange_ids); [email protected]_index++) { for([email protected] = 0; [email protected] < @inventorylist_count, [email protected]++) { if (@inventorylist_id[[email protected]] == .exchange_ids[[email protected]_index]) { if (@inventorylist_amount[[email protected]] >= .exchange_amount[[email protected]_index]) { set([email protected]_coin_index[getarraysize([email protected]_coin_index)], [email protected]_index); set([email protected]$, ( [email protected]$ = "" ? "" : ":" ) + getitemname(.exchange_ids[[email protected]_index]) + "(" + @inventorylist_amount[[email protected]] + ")"); } } } } freeloop(false); // Display Option to Show them choices and how many coins they have... set [email protected], select([email protected]$) - 1; // Subtract 1 to get Array Index set [email protected], [email protected]_coin_index[[email protected]]; dispbottom("You have chosen to use " + getitemname(.exchange_ids[[email protected]]) ); progressbar("00FF00", .exchange_duration[[email protected]]); // Start the Progressbar // On Progress Bar Completion... let's see what we do here... delitem(.exchange_ids[[email protected]], .exchange_amount[[email protected]]; freeloop(true); for([email protected] = 0; [email protected] < getarraysize(.available_items); [email protected]++) { [email protected] = rand(1, 100); if ([email protected] <= .available_chance[[email protected]]) { // GET THE ITEM mes "Here you go"; getitem(.available_items[[email protected]], .available_amount[[email protected]]); if (.available_chance[[email protected]] <= .announce_level_chance) { announce(strcharinfo(0) + " just scored " + getitemname(.exchange_ids[[email protected]]), bc_all, C_YELLOW); } close; } } freeloop(false); mes("You got the default prize..."); getitem(.default_item, .default_amount); close; OnInit: setarray(.exchange_ids, 673, 675, 671, 677); setarray(.exchange_amount, 1, 1, 1, 1); setarray(.exchange_duration, 10, 8, 5, 2); // # of seconds to progressbar... setarray(.available_items, 501, 502, 503, 504); setarray(.available_amount, 1, 1, 1, 1); setarray(.available_chance, 50, 40, 30, 10); // % of 100 set(.announce_level_chance, 10); // Will only display announce if they get item 504... since it's the only one with 10 chance or lower set(.default_item, 501); set(.default_amount, 1); end; }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.