Rynbef Posted March 6, 2023 Posted March 6, 2023 Yes, I'm not joking. Chatgpt is able to scripting. Of course it's not rly the complex one but it works. Here is the code: prontera,140,140,4 script Healer 4_F_HILDA,{ if (getgmlevel() >= 1) { // nur für GMs verfügbar mes "[Healer]"; mes "Hallo, wie kann ich dir helfen?"; next; if (select("Ich möchte geheilt werden.") == 1) { mes "[Healer]"; mes "Klar, ich werde dich heilen!"; heal 100,100; // HP und SP heilen close2; } } else { mes "[Healer]"; mes "Es tut mir leid, ich kann dir nicht helfen."; close2; } } OnInit: setarray .mobid, 383; // Sprite-ID des Healers setarray .mobx, 140; // X-Koordinate des Healers setarray .moby, 140; // Y-Koordinate des Healers setarray .mobs, 4; // Richtung des Healers setarray .mobby, 0; // Mobspawn-Optionen spawnnpc .mobid[rand(0, getarraysize(.mobid)-1)], .mobx[rand(0, getarraysize(.mobx)-1)], .moby[rand(0, getarraysize(.moby)-1)], .mobs[rand(0, getarraysize(.mobs)-1)], "", .mobby[rand(0, getarraysize(.mobby)-1)], 0, 0, 0, 0; end; Rynbef~ Quote
Rynbef Posted March 6, 2023 Author Posted March 6, 2023 Notice: if u don't think this is real cuz of my mistake "prontira" or 383 and he replace it with 4_F_HILDA. try it by your self. Please give them as much details as possible. After this I could say "remove the min group level" etc and he will do it. Rynbef~ Quote
Akkarin Posted March 7, 2023 Posted March 7, 2023 spawnnpc isn't a script command. No reason at all to create arrays for variables, and all those extra getarraysize commands.. Short answer: no, it cant. Don't be lazy. Quote
Rynbef Posted March 9, 2023 Author Posted March 9, 2023 I know it but u can tell it and he fix it. For story line quests or translations it works perfectly. Rynbef~ Quote
Skorm Posted March 9, 2023 Posted March 9, 2023 Ehh this is what I got when I asked awhile ago. In other word garbage because of the email filter. - script Item Exchange -1,{ // Item IDs and exchange rates setarray .itemList,501,502,503,504; setarray .exchangeRates,10,20,30,40; // Reward IDs and amounts setarray .rewardList,1001,1002,1003,1004; setarray .rewardAmounts,1,2,3,4; mes "Hello there! I am the Item Exchange NPC."; mes "I can exchange certain items for rewards."; next; mes "Here is the list of items that I accept:"; for (set [email protected],0; [email protected] < getarraysize(.itemList); set [email protected],[email protected]+1) { mes "- " + getitemname(.itemList[[email protected]]) + " x " + .exchangeRates[[email protected]]; } next; mes "What would you like to exchange today?"; [email protected] = select("Exchange an item for a reward","I'll come back later"); if ([email protected] == 2) { close; } mes "Great! Please select the item that you would like to exchange."; [email protected] = menu("Please select the item:", getitemname(.itemList)); if ([email protected] == 0) { mes "You don't have any of the required items."; close; } [email protected] -= 1; mes "You have selected " + getitemname(.itemList[[email protected]]) + "."; mes "How many of these items would you like to exchange?"; [email protected] = input("Please enter the quantity:"); if ([email protected] <= 0) { mes "You must enter a valid quantity."; close; } if ([email protected] > getitemcount(.itemList[[email protected-1]])) { mes "You don't have enough of the selected item."; close; } mes "You have selected to exchange " + [email protected] + " " + getitemname(.itemList[[email protected-1]]) + "."; mes "Here is the list of rewards that you can choose from:"; for (set [email protected],0; [email protected] < getarraysize(.rewardList); set [email protected],[email protected]+1) { mes "- " + getitemname(.rewardList[[email protected]]) + " x " + .rewardAmounts[[email protected]]; } next; mes "Which reward would you like to receive?"; [email protected] = menu("Please select your reward:", getitemname(.rewardList)); if ([email protected] == 0) { mes "You must select a valid reward."; close; } [email protected] -= 1; mes "You have selected " + getitemname(.rewardList[[email protected]]) + "."; mes "Here is your reward:"; getitem .rewardList[[email protected]], .rewardAmounts[[email protected]]; delitem .itemList[[email protected]], .exchangeRates[[email protected]] * [email protected]; close; } Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.