Jump to content

Vach

Members
  • Posts

    326
  • Joined

  • Last visited

Everything posted by Vach

  1. As Emistry stated in this thread: http://rathena.org/board/topic/76129-get-memo-data-with-a-scripting-command/page__pid__169119#entry169119 There doesn't appear to be a function that shows the English map name (the one written down client side in the mapnametable). Does anyone know how to retrieve this with a script command using just the map file name?
  2. Got it working, here is the updated function and the script I used, in case anyone wants to use it for their server. I would vote that this be something added to the official stuff? Better written probably. It's a neat feature anyone could use for various reasons. //setmemo(i,s,i,i) - Changes memo 1,2,3 to the string indicated, at the coords indicated. BUILDIN_FUNC(setmemo) { TBL_PC *sd;// = script_rid2sd(st); int memo; int x,y; short mapid; //const char* mapname; //mapindex_name2id(str) sd = script_rid2sd(st); if( sd == NULL ) { ShowError("setmemo: Error, function called with no player attached to script.\n"); return 0; } memo = script_getnum(st,2); //mapname = script_getstr(st,3); mapid = mapindex_name2id(script_getstr(st,3)); x = script_getnum(st,4); y = script_getnum(st,5); if( !script_getstr(st,3) == C_STR || !script_getstr(st,3) == C_CONSTSTR ) { ShowError("setmemo: mapname sent not a string!\n"); script_pushint(st,0); return 0;// data type mismatch } if (!mapid) { ShowError("setmemo: mapname sent is not in proper format (remove '.gat')"); script_pushint(st,0); return 0; } if (memo > MAX_MEMOPOINTS || memo > 3) { ShowError("setmemo: Requested memo is higher than 3 or unavailable to player."); script_pushint(st,0); return 0; } if (!x || !y) { ShowError("setmemo: map x and/or y coords set to 0 or less!\n"); script_pushint(st,0); return 0; } //All checks complete, commense process. sd->status.memo_point[memo].map = mapid; sd->status.memo_point[memo].x = x; sd->status.memo_point[memo].y = y; script_pushint(st,1); // 1 is success. return 0; } Script choice: getmapxy(@mapname$,@mapx,@mapy,0); if (setmemo(1,@mapname$,@mapx,@mapy) == 1) { mes "..."; mes "Success!"; close; } The problem was the use of the function embedded into setting .map, apparently it did not configure properly. I made an error report anyway.
  3. So the "Manage Skill Damage_2.0 r17066.patch " uploaded by Angel is indeed working up to date with the current stuff?
  4. The in-game exit to windows is totally fine. As for everything else, I would think returning back to the initial (blank) login-screen would be desired behavior. If that's not possible at all, you could make it go back to the license accept screen - which would have to be enabled to work but could be used as a last resort.
  5. Vach

    max item limit

    I ran into some thing similar to this as well. I'm hoping it's not hard coded into the client.
  6. There is only 7 numbers in that entry, skill cast database entries have 8. I'm not sure how this is causing things to react on your server. Perhaps it is interpreting it as "default". I get error messages on mapserv when I screw up those lines.
  7. What about all that stuff Random said? All those changes? Does that fix the issue? Where is Lilith? XD
  8. What's the primary difference between this code and mine, at least in terms of functionality? The only main difference I see is setting the map index to a short and checking if the short is above 0 before setting the memo map. Have you tested it? The function I used in my npc script was "getmapxy" to find the map name... That might be the issue.
  9. Wow thanks! This totally put me on the right track, I ended up writing the following function: //setmemo(i,s,i,i) - Changes memo 1,2,3 to the string indicated, at the coords indicated. BUILDIN_FUNC(setmemo) { TBL_PC *sd;// = script_rid2sd(st); int memo; int x,y; const char* mapname; //mapindex_name2id(str) sd = script_rid2sd(st); if( sd == NULL ) { ShowError("setmemo: Error, function called with no player attached to script.\n"); return 0; } memo = script_getnum(st,2); mapname = script_getstr(st,3); x = script_getnum(st,4); y = script_getnum(st,5); if( !script_getstr(st,3) == C_STR || !script_getstr(st,3) == C_CONSTSTR ) { ShowError("setmemo: mapname sent not a string!\n"); script_pushint(st,0); return 0;// data type mismatch } if (memo > MAX_MEMOPOINTS || memo > 3) { ShowError("setmemo: Requested memo is higher than 3 or unavailable to player."); script_pushint(st,0); return 0; } if (!x || !y) { ShowError("setmemo: map x and/or y coords set to 0 or less!\n"); script_pushint(st,0); return 0; } //All checks complete, commense process. sd->status.memo_point[memo].map = mapindex_name2id(mapname); sd->status.memo_point[memo].x = x; sd->status.memo_point[memo].y = y; script_pushint(st,1); // 1 is success. return 0; } Unfortunately, when used properly in an NPC script it crashes the server. I know it gets to the point where the variables are overwritten and that's when the map crash occurs, so it at least gets to that point. I was wondering if someone could point out the errors in there? EDIT: OH MAN THAT'S UGLY PASTED! My apologies... >_<''
  10. Skill cool-down is in skill_cast_db.txt, it's the 7th number in the list of numbers, the first being the skill ID. It's in milliseconds.
  11. Thanks Annie. HEY EVERYBODY IN SOURCE SUPPORT! Anyone know how to do something like this? I'm still learning the source and making new script commands is definitely something I'm a novice at. The source that Annie introduced in skill.c seems like the point where the memos are called and used to warp to... I would need to edit them and keep this part of the function intact. However: sd->status.memo_point[#].map seems to point to the data stored with the map information. I would need a script command to edit that? What about the coordinates? Or is editing this going to blow up the server?
  12. Hahaha, sounds good. I look forward tot he progress.
  13. Hmmm... I know how to make the script based warp points, using variables, but I want to be able to use the Warp Portal skill which requires the use and manipulation of the memo save data. The first thing I want to do is give more control of creating memos, so you don't just replace the first, but this is just the beginning. You're sure memos cants be modified while the player is connected? In that case I may want to move this to source support, because I would need help making a new script command... I'm hoping this isn't necessary, though.
  14. Thanks Ai4rei, I appreciate all your work on this as I assume everyone does. I was wondering if I could add that client close prevention to the todo list?
  15. I don't use 04-10a, I'm actually using 07-16. I can help you with that one but not the older one. Sorry.
  16. My apologies for making another post, but I have tried a few things and still need a little help. Can someone give me an example of putting the memo data into some variables, and then editing the memo data within the script as well? I'd like to be able to pull/edit memos whenever via a function. Thank you everyone.
  17. So, are all these necessary for the mod to work on the current revision, or are these just your efficiency changes? I haven't had a chance to test it but I wanted to make sure before I changed everything because I keep getting revision errors and I'm trying to avoid as many as possible.
  18. Wait, I think I may not be understanding this: So I would type "SELECT map,x,y" in the query command?
  19. Is this possible? I want to link my checkpoint system with the warp portal skill. This would also allow me to create a dynamic NPC dialogue in which players can pick which slot to make memos, so they can save important warps they don't want to go anywhere... and get rid of the "Save Point" one. I'm assuming it can be done with some SQL queries but that stuff is beyond me at the moment.
  20. Yea, I was thinking that when I posted... why not just... do it now? ...but then I had my computer troubles and ah... I digress. XD Anyway, to change the functionality of these skills go to skill.c and find this block: case AL_INCAGI: case AL_BLESSING: case MER_INCAGI: case MER_BLESSING: if (dstsd != NULL && tsc->data[sC_CHANGEUNDEAD]) { skill_attack(BF_MISC,src,src,bl,skillid,skilllv,tick,flag); break; } This section of code is earlier in the skill call and declares individual targets using: clif_skill_nodamage(src,bl,skillid,skilllv, sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv))); Comment out the AL_INCAGI and AL_BLESSING lines here, NOTE, this will mean you cannot target undead with them anymore. Then find this block: case AL_ANGELUS: case PR_MAGNIFICAT: case PR_GLORIA: case SN_WINDWALK: case CASH_BLESSING: case CASH_INCAGI: case CASH_ASSUMPTIO: if( sd == NULL || sd->status.party_id == 0 || (flag & 1) ) clif_skill_nodamage(bl, bl, skillid, skilllv, sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv))); else if( sd ) party_foreachsamemap(skill_area_sub, sd, skill_get_splash(skillid, skilllv), src, skillid, skilllv, tick, flag|BCT_PARTY|1, skill_castend_nodamage_id); break; And add: // Added here for "global cast effect" case AL_INCAGI: case AL_BLESSING: // --- Above it. After this it is very important you go to skill_db and make Increase AGI and Blessing mimic Angelus's skill db settings (target flags, etc.) And that was it!
  21. Everything should be working fine in 04-10a. You just need to appropriately update the text files clientside. This is more an issue for the System folder clients.
  22. My apologies to everyone for my delay in responding. I have been having computer troubles and therefore only had access to this forum via mobile devices (no code to look at). That's pretty awesome, thank you Euphy. The part I was talking about with getarraysize() is what it returns for an array that doesn't exist, but you increased the value for the menu later in the script (since menus start at 1). So, that worked out. Although I think in order to compensate for that I'll start all the store arrays at 1 instead of 0 just to save the modifier later. Thanks everyone! I am probably going to go with Euphy's afterall because it allows me the easiest time making sub-menus (because the function can just be slightly modified to be called "when ready").
  23. Vach

    Monster Mode!

    Why not simply raise the DEF and MDEF to 1000000 (1 mil)? That's what I do on my server.
×
×
  • Create New...