OK論壇

 找回密碼
 註冊
查看: 2022|回復: 6

取得 某位玩家 所在地圖語法

 關閉 [複製鏈接]
  • TA的每日心情
    郁悶
    2015-4-9 03:20 AM
  • 簽到天數: 18 天

    連續簽到: 1 天

    [LV.4]偶爾看看III

    發表於 2011-12-16 06:34:44 | 顯示全部樓層 |閱讀模式
    比如說

    我設定
    input @who$;

    然後有什麼語法可以取得@who$所在地圖的嗎

    if @who$在特定地圖 則npc將不執行動作@@"?
    回復

    使用道具 舉報

  • TA的每日心情
    開心
    2024-9-6 01:09 AM
  • 簽到天數: 1324 天

    連續簽到: 1 天

    [LV.10]以壇為家III

    發表於 2011-12-16 08:10:25 | 顯示全部樓層
    本帖最後由 sinya 於 2011-12-16 10:26 AM 編輯

    getmapxy(.@m$,.@mx,.@my,0);

    if(.@m$ !="地圖名稱") close;
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    郁悶
    2015-4-9 03:20 AM
  • 簽到天數: 18 天

    連續簽到: 1 天

    [LV.4]偶爾看看III

     樓主| 發表於 2011-12-16 09:00:52 | 顯示全部樓層
    getmapxy(.@m$,@mx,.@my,0);

    if(.@m$ !="地圖名稱") close;
    sinya 發表於 2011-12-16 08:10 AM



        沒有辦法是由A輸入B名字
        然後取得B的所在地圖嗎@@?
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    開心
    2016-8-7 08:11 AM
  • 簽到天數: 534 天

    連續簽到: 7 天

    [LV.9]以壇為家II

    發表於 2011-12-16 10:03:06 | 顯示全部樓層
    doc\script_commands.txt 有範例
    prontera,164,299,3%TAB%script%TAB%Nyah%TAB%730,{
            input @who$;
            if (getmapxy(@mapname$,@mapx,@mapy,1,@who$)!=0) goto Notfound;
            mes "And I found him on map "+@mapname$+" at X:"+@mapx+" Y:"+@mapy+" !";
            close;
        Notfound:
            mes "I can't seem to find Meh anywhere!";
            close;
       }
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    郁悶
    2015-4-9 03:20 AM
  • 簽到天數: 18 天

    連續簽到: 1 天

    [LV.4]偶爾看看III

     樓主| 發表於 2011-12-16 10:29:49 | 顯示全部樓層
    doc\script_commands.txt 有範例
    Jackey650630 發表於 2011-12-16 10:03 AM



        謝謝你!!!!!!!!!!!我真的對你很感激qq
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    開心
    2024-9-6 01:09 AM
  • 簽到天數: 1324 天

    連續簽到: 1 天

    [LV.10]以壇為家III

    發表於 2011-12-16 10:43:10 | 顯示全部樓層
    本帖最後由 sinya 於 2011-12-16 10:46 AM 編輯

    no,那是找npc不是找人,正確應該是這樣

    input .@who$;
    if(getmapxy(.@m$,.@mx,.@my,0,.@who$) !=0 || .@m$ !="地圖名稱") close;
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    無聊
    2025-2-26 12:31 PM
  • 簽到天數: 73 天

    連續簽到: 1 天

    [LV.6]常住居民II

    發表於 2011-12-24 21:33:07 | 顯示全部樓層
    本帖最後由 sb66665112 於 2011-12-24 09:34 PM 編輯
    1. *getmapxy("授予你地圖的變數名稱"(字串),授予你地圖的x變數名稱(數字),授予你地圖的y變數名稱(數字),種類{,"搜尋字樣"})

    2. This function will locate a character object(這個函數將會找出一個目標角色, NPC object or pet's coordinates (目標Npc或者寵物??)
    3. and place their coordinates into the variables specified when calling it.(寄他們的動作在變數裡) It
    4. will return 0 if the search was successful(如果他查詢成功,將會返回0), and -1 if the parameters given were
    5. not variables or the search was not successful.(如果變數給的不是可變的(???白癡翻譯+1)或者查詢不成功就會返回-1

    6. Type is the type of object to search for:(以下是搜查目標的種類)

    7.   0 - Character object (角色,就是玩家)
    8.   1 - NPC object (Npc,廢話當然是Npc)
    9.   2 - Pet object (寵物,嗯..不知道要怎麼解釋)
    10.   3 - Monster object. (怪物...,你查的到才有鬼)
    11.   
    12. While 3 is meant to look for a monster object, no searching will be done if you
    13. specify type 3, and the function will always return -1.

    14. The search string is optional. If it is not specified, the location of the
    15. invoking character will always be returned for types 0 and 2, the location of
    16. the NPC running this function for type 1.
    17. If a search string is specified, for types 0 and 1, the character or NPC with
    18. the specified name will be located. If type is 3, the search will locate the
    19. current pet of the character who's name is given in the search string, it will
    20. NOT locate a pet by name.

    21. What a mess. Example, a working and tested one now:

    22.     prontera,164,301,3%TAB%script%TAB%Meh%TAB%730,{
    23.         mes "我的名字是Meh. Nyah能夠找到在這裡的我."; (這句廢話請無視)
    24.         close;
    25.     }

    26.     prontera,164,299,3%TAB%script%TAB%Nyah%TAB%730,{
    27.         mes "我的名字是 Nyah.";
    28.         mes "現在我將會橫過這個世界去找尋 Meh !"; // (??!!?這句我翻錯很大 (當然,我翻的沒一句是對的)
    29.         if (getmapxy(@mapname$,@mapx,@mapy,1,"Meh")!=0) goto Notfound; //當然這個指令是當
    30. 找到Npc (種類1) Meh的時候 會把Meh的地圖名稱紀錄在@mapname$ X做標記錄在@mapx Y座標記錄在@mapy
    31.         mes "然而我找到他了,地圖是 "+@mapname$+" 位於X座標:"+@mapx+" Y座標:"+@mapy+" !";
    32.         close;
    33.     Notfound:
    34.         mes "我在我能所見的任何地方沒有找到Meh!";
    35.         close;
    36.    }
    37.    
    38. Notice that NPC objects disabled with 'disablenpc' will still be located.
    39. (這句大概是表達複製Npc的話只會回傳本尊的座標地圖)
    複製代碼
    回復 支持 反對

    使用道具 舉報

    您需要登錄後才可以回帖 登錄 | 註冊

    本版積分規則

    Archiver|手機版|小黑屋|OK討論區

    GMT+8, 2025-6-30 01:15 PM , Processed in 0.363925 second(s), 19 queries , Gzip On.

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回復 返回頂部 返回列表